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:
- Q
Quiver
- 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 the
FontProperties
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.
- Q
Notes
Note
This is thepyplot wrapper for
axes.Axes.quiverkey
.