animation - Animating circle to increase and decrease in size over a period of time - matlab -


i create simple visualization whereby circle (country) increase/decrease in size(base on variables) respect time.

how can done on matlab current dataset ? want each circle represent country , size of circle determined value in particular year. c1990 represents year 1990

enter image description here

enter image description here can anyhow point me in right direction or me started ?

thanks

here 2 possible ways start, using scatter (note area of circles proportional values of 10*d, not radius or diameter)

close figure(1) d=rand(10,10) cx=1:10; cy=cx; i=1:length(d(:,2))     scatter(cx,cy,(10*d(:,i)))     drawnow     pause(.1) end 

or plotting circles manually, radius of circle corresponding d

figure(2) d=rand(10,10) cx=1:10; cy=cx; phi=0:pi/100:2*pi; i=1:length(d(:,2))     k=1:length(cx)         r=d(k,i);         plot(cx(k)+r*cos(phi),cy(k)+r*sin(phi))         hold on     end     drawnow     pause(.1)     hold off end 

(you can have area or radius of circles proportional d in either case)


Comments

Popular posts from this blog

jQuery Mobile app not scrolling in Firefox -

c++ - How to add Crypto++ library to Qt project -

php array slice every 2th rule -