Display Scale on Quiver Plot

55 views (last 30 days)
Jack B
Jack B on 15 Feb 2015
Commented: kalani Lakshani on 4 Mar 2021
Hello,
I'm looking to display the scale of my arrows on a quiver plot I've produced in relation to the plot itself. So the reader can look at my arrows and understand how they're size relate to the axis of the plot. I hope I'm being clear. Let me know if I'm not.
I basically don't know how to do this. Can anyone offer some suggestions or tips to make this happen.
Jack.

Answers (2)

Felipe Breton
Felipe Breton on 20 Dec 2018
I had the same need, so what I did was to add one extra point in my map with a reference velocity. Then I added some text close to this "reference arrow" to explain it. Of course, some empty space on the map is needed. Basically, it would be as follows:
Taking the example shown in quiver.m 's reference page:
[x,y] = meshgrid(0:0.2:2,0:0.2:2);
u = cos(x).*y;
v = sin(x).*y;
figure
But then:
%An additional row of points is added at y=2.2:
[X,Y]=meshgrid([0:0.2:2],2.2);
%Then a reference arrow velocity is defined at x=0.2 and y=2.2, while rest of points are left as zero:
u_rf=zeros(1,11);
v_rf=zeros(1,11);
u_rf(1,2)=1;
%Thus, quiver plot is applied including the new row:
quiver([X;x],[Y;y],[u_rf;u],[v_rf;v]); %is done like this to be sure we got the same arrow AutoScale
%Finally some text is included:
text(0.05,2.3,'Arrow scale: 1m/s')
Resulting in the following plot:
example ref arrow.bmp
I hope it may help someone, as this post it quite old.
Felipe.

Star Strider
Star Strider on 15 Feb 2015
I never thought about doing that with quiver. I’m not certain that what you want to do is possible, but experiment with Quiver Series Properties, specifically those listed under ‘Arrow’.
  3 Comments
Star Strider
Star Strider on 15 Feb 2015
My pleasure!
The arrow lengths scale themselves, so I’m not certain exactly how you would display the scale on a legend or some such. I’ve never see this addressed anywhere, and I've never done it myself. I occasionally turned the 'AutoScale','off' to show the arrows for short segments (where the arrows might not otherwise be visible), but otherwise I just let them alone.
kalani Lakshani
kalani Lakshani on 4 Mar 2021
Hello @Jack B
Can I know whether you found the answer for your question?

Sign in to comment.

Categories

Find more on Vector Fields in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!