我需要 matplotlib.quiver
方面的帮助.
我正在创建一些数据,这些数据给了我一个很好的颤动图:
箭头的尺寸很小,使绘图易于阅读。 但现在我想缩放(通过使用底部的放大镜符号)到左上角以查看红点周围的更多细节。我得到这张照片:
这仍然是正确的,但现在可读性很差。箭头太短,看不清那里发生了什么。
所以我的问题是:我需要如何调用ax.quiver(*meshgrid, *data)
缩放箭头长度,使其在放大时变得更大?
谢谢! :)
最佳答案
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.
(强调我的)
关于python - Matplotlib:如何在缩放时缩放颤动图?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54537677/