Display Scale on Quiver Plot
47 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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.
0 commentaires
Réponses (2)
Felipe Breton
le 20 Déc 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:
[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:
I hope it may help someone, as this post it quite old.
Felipe.
0 commentaires
Star Strider
le 15 Fév 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 commentaires
Star Strider
le 15 Fév 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
le 4 Mar 2021
Can I know whether you found the answer for your question?
Voir également
Catégories
En savoir plus sur Vector Fields dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!