Matplotlib:如何在缩放时缩放箭袋图?

Matplotlib: How do I scale a quiver plot while zooming?

我在 matplotlib.quiver 方面需要一些帮助。

我正在创建一些数据,这些数据给我一个很好的箭袋图:

箭头的尺寸很小,使情节易于阅读。 但现在我想放大(通过使用底部的放大镜符号)到左上角以查看红点周围的更多细节。我得到这张照片:

这还是对的,但现在可读性很差。箭头太短,看不清那里发生了什么。

所以我的问题是:我需要如何调用 ax.quiver(*meshgrid, *data) 来缩放箭头长度,以便在放大时它们会变大?

谢谢! :)

来自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.

(强调我的)