Reputation: 468
I need some help with matplotlib.quiver
.
I was creating some data that give me a nice quiver plot:
The arrows have a good small size to make the plot readable. But now I want to zoom (by using the magnifier symbol on the bottom) to the top left corner to see more details around the red dot. And I get this picture:
This is still right, but now it is bad readable. The arrows are too short to see what’s going on there.
So my question is: How do I need to call ax.quiver(*meshgrid, *data)
to scale the arrow lengths such that they will become larger when zooming into?
Thank you! :)
Upvotes: 3
Views: 1953
Reputation: 339220
From the quiver
documentation:
units
: [ 'width' | 'height' | 'dots' | 'inches' | 'x' | 'y' | 'xy' ] The arrow dimensions (except for length) are measured in multiples of this unit.'width' or 'height': the width or height of the axis
'dots' or 'inches': pixels or inches, based on the figure dpi
'x', 'y', or 'xy': respectively X, Y, or sqrt(X2+Y2) in data units
The arrows scale differently depending on the units. For 'x' or 'y', the arrows get larger as one zooms in; for other units, the arrow size is independent of the zoom state. For 'width or 'height', the arrow size increases with the width and height of the axes, respectively, when the window is resized; for 'dots' or 'inches', resizing does not change the arrows.
(emphasis mine)
Upvotes: 2