I am using matlab to plot some ugly vectors. I would like to plot the velocities on the vertex of a regular mesh, and also some velocities of discrete points. So I use twice QUIVER function. The simplified codes are:
figure
scale=0.2;
quiver(mesh.x,mesh.y,mesh.u,mesh.v,scale,'r')
quiver(pt.x,pt.y,pt.u,pt.v,scale,'g')
The problem is the output scales are different for the mesh and the points even I used the same value for them. It looks quite silly! Could anyone let me how to solve it? Thank you very much!
Cheers,
Hua
I solved my problem by dividing a scale factor from the original velocities, and then set 'AutoScale' as 'off'. Then all the vectors have the same scale at last.
Hua
I have the same problem:
I have a set of vectors; I want to plot a sub-set B in blue and another sub-set (R) in red. The obvious for me would be
quiver(xB,yB,U,W,scale,'b','Autoscale','off'); hold
quiver(xR,yR,U,W,scale,'r','Autoscale','off');
xB and yB are NaN where xR and yR are finite but this is irrelevant.
The output scales are apparently different; vectors of the same length are ploted with very different lengths.
Is this a bug? how do I correct this? Hua's solution does not seem to work for me.
Thanks for any help.
Rui
I simply want to plot a scalebar for my vectors, and they are clearly coming out on different scales, which is somewhat problematic! I tried Hua's suggestion also, and it didn't seem to fix it.
What is the 'AutoScale' switch for, if it doesn't switch off the Autoscaling?
Kurt
qscale = 0.1 ; % scaling factor for all vectors
h1 = quiver(X1,Y1,U1,V1,0) ; % the '0' turns off auto-scaling
h2 = quiver(X2,Y2,U2,V2,0) ;
hU = get(h1,'UData') ;
hV = get(h1,'VData') ;
set(h1,'UData',qscale*hU,'VData',qscale*hV)
hU = get(h2,'UData') ;
hV = get(h2,'VData') ;
set(h2,'UData',qscale*hU,'VData',qscale*hV)
I am using the quiver function to display the orientation within high resolution images.
The vector apear at each pixel, anyone knows how to decrease the resolution of the quiver arrows in relation to the images?? I want to see the arrows in a high resolution domain.
Essentially I want to put a vector for each group of binned pixels so that the high res image has a vector corresponding to a group of say 2x2 pixels. This will make the arrows less dense and easier to view.
Thanks,
Tiago Leal
Thanks, that's a nice solution which will also work with Quiver3.
Shame that it isn't built into the functionality though, for large quivergroups this can take quite a while to update. I'd have thought that TMW would have foreseen this need when writing the function.