matplotlib.pyplot.quiverkey#

matplotlib.pyplot.quiverkey(Q,X,Y,U,label,**kwargs)[source]#

Add a key to a quiver plot.

The positioning of the key depends onX,Y,coordinates, andlabelpos. Iflabelpos is 'N' or 'S',X,Y give the position ofthe middle of the key arrow. Iflabelpos is 'E',X,Y positionsthe head, and iflabelpos is 'W',X,Y positions the tail; ineither of these two cases,X,Y is somewhere in the middle of thearrow+label key object.

Parameters:
QQuiver

AQuiver object as returned by a call toquiver().

X, Yfloat

The location of the key.

Ufloat

The length of the key.

labelstr

The key label (e.g., length and units of the key).

anglefloat, default: 0

The angle of the key arrow, in degrees anti-clockwise from thehorizontal axis.

coordinates{'axes', 'figure', 'data', 'inches'}, default: 'axes'

Coordinate system and units forX,Y: 'axes' and 'figure' arenormalized coordinate systems with (0, 0) in the lower left and(1, 1) in the upper right; 'data' are the axes data coordinates(used for the locations of the vectors in the quiver plot itself);'inches' is position in the figure in inches, with (0, 0) at thelower left corner.

colorcolor

Overrides face and edge colors fromQ.

labelpos{'N', 'S', 'E', 'W'}

Position the label above, below, to the right, to the left of thearrow, respectively.

labelsepfloat, default: 0.1

Distance in inches between the arrow and the label.

labelcolorcolor, default:rcParams["text.color"] (default:'black')

Label color.

fontpropertiesdict, optional

A dictionary with keyword arguments accepted by theFontProperties initializer:family,style,variant,size,weight.

zorderfloat

The zorder of the key. The default is 0.1 aboveQ.

**kwargs

Any additional keyword arguments are used to override vectorproperties taken fromQ.

Notes

Examples usingmatplotlib.pyplot.quiverkey#

Advanced quiver and quiverkey functions

Advanced quiver and quiverkey functions

Quiver Simple Demo

Quiver Simple Demo