Greg, could you provide more of your code below. I have been trying to figure out how to add the quivers to a contour but can't follow everything you are doing.
thanks, bill
"Greg" wrote in message <jepn6b$d9b$1@newscl01ah.mathworks.com>...
> you can use the annotation function. It puts an arrow on the plot but instead of using data values for the position it uses fractions of the plot window, you will have to extract the limits of the plot space in the figure window using get(gca,'xlim') and 'ylim' and get(gca,'Position') for the size and start of the plot space within the window.
> its a bit of a faff but i ended up with something like this for placing on a contour plot;
>
> lims = [get(gca,'xlim') get(gca,'ylim')];
> framelim = get(gca,'Position');
> lfac = [lims(2)lims(1) lims(4)lims(3)];
> for pos =1:10:maxp
> for z = 1:z_tot
> spos = [points2d(1,pos,z)/lfac(1) points2d(3,pos,z)/lfac(2)].*framelim(3:4)+framelim(1:2);
> epos = spos(1:2)+0.02*([vel2d(1,pos,z,1) vel2d(3,pos,z,1)].*framelim(3:4));
> if epos(1)<0;epos(1)=0;end;if(epos(2))<0;epos(2)=0;end;
> if epos(1)>1;epos(1)=1;end;if(epos(2))>1;epos(2)=1;end;
> if epos==spos; epos=spos+[0.02 0];end %no velocity make it parallel looking
> annotation(figure(51),'arrow',[spos(1) epos(1)],[spos(2) epos(2)])
> end
> end
>
> goodluck
>
> Greg
>
> "Hermano Cappa" wrote in message <jbm6k4$5nb$1@newscl01ah.mathworks.com>...
> > Hi,
> >
> > How can you change the aspect ratio of a quiver plot? For a simple figure made with the plot function, you can easily do this with:
> >
> > set(gca,'DataAspectRatio',[dr/dx 1 1]);
> >
> > However, it seems that this is not the case for a quiver plot.
