Hi matlab users, I am trying to make a surface current animation in GUI.The GUI contains the map in axes1 and the location of stations are updated with plot command and axes hold is on;here i made axes1 property hold is on,because in axes1 first map appears and the station locations has appears for identifications.
The total data sets may be the 10 hours,each hour data is a single file having longitude,latitude,u,v.when i am trying to plot the current using quiver2 in axes1 the first hour data plots appears well, and the next hours datas are overlapping with the same plot due to the axes1 hold is on;If i make hold to off,only the current appears, the map and the station locations are disappears. is any solution to plot surface current one by one with out overlapping?
Here I given my code.. ...
image([-180 180], [90 -90],map); hold on; plot(long2(:,1),lat2(:,1),'^g','MarkerFaceColor','g','MarkerSize',12); ... for xx=1:hrs_diff
zz=[datestr(from_da2,'yyyy-mm-dd HH') '*'];
dt_loc=strfndw(ttt(:,5),zz); from_da2=addtodate(from_da2,1,'Hour'); len_dt_loc=length(dt_loc); for xc=1:len_dt_loc pl_lon(xc,1)=ttt(dt_loc(xc),1); pl_lat(xc,1)=ttt(dt_loc(xc),2); pl_ucomp(xc,1)=ttt(dt_loc(xc),3); pl_vcomp(xc,1)=ttt(dt_loc(xc),4); pl_dtm(xc,1)=ttt(dt_loc(xc),5); end
quiver2(pl_lon(:,1),pl_lat(:,1),pl_ucomp(:,1),pl_vcomp(:,1),'n=',0.03); pause(0.2); end