How do I scale separate quiver subplots to be the same scale in relation to each other?
20 views (last 30 days)
Show older comments
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
0 Comments
Answers (1)
Jyotish Robin
on 27 Mar 2017
Edited: Jyotish Robin
on 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 ! :)
See Also
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!