Azzera filtri
Azzera filtri

How do I scale separate quiver subplots to be the same scale in relation to each other?

26 visualizzazioni (ultimi 30 giorni)
Hello,
My code runs a for loop to obtain several subplots to put onto one figure. However, when using the AutoScale property of the quiver function, it appears that the arrows scale down to fit onto the plot. This is inconvenient as I would like all the arrows to be the same scale in relation to each other across all plots. Is this a possibility? Essentially, I would like to not use the AutoScale property (so that they are all the same scale) but to still be able to scale the arrows down so they all fit inside their respective plots (not individually).
If this is not possible, is there a way to provide a legend of the size of arrow in relation to magnitude of velocity?
Many thanks, Adam

Risposte (1)

Jyotish Robin
Jyotish Robin il 27 Mar 2017
Modificato: Jyotish Robin il 27 Mar 2017
Hi Adam!
From the query, I understand that you would like to have the arrows in the quiver plots to be of the same scale across all plots.
Turning off the 'AutoScale' property of "quiver" prevents "quiver" from rescaling vectors according to the data. By manually scaling the data, the same scale can be kept between two quiver plots.
You can find more info about the same in the following link:
If you are interested in knowing how "quiver" scale the vector it plots, see the following link: https://www.mathworks.com/matlabcentral/answers/94454-how-does-quiver-scale-the-vectors-it-plots
To know how to adjust the arrowhead proportions when the x-data and y-data ranges differ substantially, see the following link:
Hope you find the above suggestions helpful ! :)
  1 Commento
Adam Curran
Adam Curran il 27 Mar 2017
Hi Jyotish Robin,
Thanks very much! The first two links have provided great help. Practically kicking myself now, as it seems so obvious haha
Since I posted this, I have been finding putting up values on the graph to display what magnitudes the velocities my vector plots have a bit messy. As suggested above, I thought a legend with an arrow displaying what 0.1m/s looked like would be useful. Any good way to do this without having to plot the arrow some place in the figure myself?
Or any suggestions to display the values would be gratefully received!
Many thanks again, Adam

Accedi per commentare.

Categorie

Scopri di più su Vector Fields in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by