matplotlib.pyplot.tripcolor   matplotlib.pyplot.tripcolor(*args, alpha=1.0, norm=None, cmap=None, vmin=None, vmax=None, shading='flat', facecolors=None, **kwargs)[source]

Create a pseudocolor plot of an unstructured triangular grid. The triangulation can be specified in one of two ways; either: tripcolor(triangulation, ...)
 where triangulation is a Triangulation object, or tripcolor(x, y, ...)
tripcolor(x, y, triangles, ...)
tripcolor(x, y, triangles=triangles, ...)
tripcolor(x, y, mask=mask, ...)
tripcolor(x, y, triangles, mask=mask, ...)
 in which case a Triangulation object will be created. See Triangulation for a explanation of these possibilities. The next argument must be C, the array of color values, either one per point in the triangulation if color values are defined at points, or one per triangle in the triangulation if color values are defined at triangles. If there are the same number of points and triangles in the triangulation it is assumed that color values are defined at points; to force the use of color values at triangles use the kwarg facecolors=C instead of just C. shading may be 'flat' (the default) or 'gouraud'. If shading is 'flat' and C values are defined at points, the color values used for each triangle are from the mean C of the triangle's three points. If shading is 'gouraud' then color values must be defined at points. The remaining kwargs are the same as for pcolor.


matplotlib.pyplot.triplot   matplotlib.pyplot.triplot(*args, **kwargs)[source]

Draw a unstructured triangular grid as lines and/or markers. The triangulation to plot can be specified in one of two ways; either: triplot(triangulation, ...)
 where triangulation is a Triangulation object, or triplot(x, y, ...)
triplot(x, y, triangles, ...)
triplot(x, y, triangles=triangles, ...)
triplot(x, y, mask=mask, ...)
triplot(x, y, triangles, mask=mask, ...)
 in which case a Triangulation object will be created. See Triangulation for a explanation of these possibilities. The remaining args and kwargs are the same as for plot.  Returns

linesLine2D

The drawn triangles edges.
markersLine2D

The drawn marker nodes.


matplotlib.pyplot.twinx   matplotlib.pyplot.twinx(ax=None)[source]

Make and return a second axes that shares the x-axis. The new axes will overlay ax (or the current axes if ax is None), and its ticks will be on the right. Examples Plots with different scales


matplotlib.pyplot.twiny   matplotlib.pyplot.twiny(ax=None)[source]

Make and return a second axes that shares the y-axis. The new axes will overlay ax (or the current axes if ax is None), and its ticks will be on the top. Examples Plots with different scales


matplotlib.pyplot.uninstall_repl_displayhook   matplotlib.pyplot.uninstall_repl_displayhook()[source]

Uninstall the Matplotlib display hook.  Warning Need IPython >= 2 for this to work. For IPython < 2 will raise a NotImplementedError   Warning If you are using vanilla python and have installed another display hook, this will reset sys.displayhook to what ever function was there when Matplotlib installed its displayhook, possibly discarding your changes.


matplotlib.pyplot.violinplot   matplotlib.pyplot.violinplot(dataset, positions=None, vert=True, widths=0.5, showmeans=False, showextrema=True, showmedians=False, quantiles=None, points=100, bw_method=None, *, data=None)[source]

Make a violin plot. Make a violin plot for each column of dataset or each vector in sequence dataset. Each filled area extends to represent the entire data range, with optional lines at the mean, the median, the minimum, the maximum, and user-specified quantiles.  Parameters

datasetArray or a sequence of vectors.

The input data.
positionsarray-like, default: [1, 2, ..., n]

The positions of the violins. The ticks and limits are automatically set to match the positions.
vertbool, default: True.

If true, creates a vertical violin plot. Otherwise, creates a horizontal violin plot.
widthsarray-like, default: 0.5

Either a scalar or a vector that sets the maximal width of each violin. The default is 0.5, which uses about half of the available horizontal space.
showmeansbool, default: False

If True, will toggle rendering of the means.
showextremabool, default: True

If True, will toggle rendering of the extrema.
showmediansbool, default: False

If True, will toggle rendering of the medians.
quantilesarray-like, default: None

If not None, set a list of floats in interval [0, 1] for each violin, which stands for the quantiles that will be rendered for that violin.
pointsint, default: 100

Defines the number of points to evaluate each of the gaussian kernel density estimations at.
bw_methodstr, scalar or callable, optional

The method used to calculate the estimator bandwidth. This can be 'scott', 'silverman', a scalar constant or a callable. If a scalar, this will be used directly as kde.factor. If a callable, it should take a GaussianKDE instance as its only parameter and return a scalar. If None (default), 'scott' is used.
dataindexable object, optional

If given, the following parameters also accept a string s, which is interpreted as data[s] (unless this raises an exception): dataset    Returns
 dict

A dictionary mapping each component of the violinplot to a list of the corresponding collection instances created. The dictionary has the following keys:
bodies: A list of the PolyCollection instances containing the filled area of each violin.
cmeans: A LineCollection instance that marks the mean values of each of the violin's distribution.
cmins: A LineCollection instance that marks the bottom of each violin's distribution.
cmaxes: A LineCollection instance that marks the top of each violin's distribution.
cbars: A LineCollection instance that marks the centers of each violin's distribution.
cmedians: A LineCollection instance that marks the median values of each of the violin's distribution.
cquantiles: A LineCollection instance created to identify the quantile values of each of the violin's distribution.


matplotlib.pyplot.viridis   matplotlib.pyplot.viridis()[source]

Set the colormap to 'viridis'. This changes the default colormap as well as the colormap of the current image if there is one. See help(colormaps) for more information.


matplotlib.pyplot.vlines   matplotlib.pyplot.vlines(x, ymin, ymax, colors=None, linestyles='solid', label='', *, data=None, **kwargs)[source]

Plot vertical lines at each x from ymin to ymax.  Parameters

xfloat or array-like

x-indexes where to plot the lines.
ymin, ymaxfloat or array-like

Respective beginning and end of each line. If scalars are provided, all lines will have same length.
colorslist of colors, default: rcParams["lines.color"] (default: 'C0')

linestyles{'solid', 'dashed', 'dashdot', 'dotted'}, optional

labelstr, default: ''

  Returns
 LineCollection
  Other Parameters

dataindexable object, optional

If given, the following parameters also accept a string s, which is interpreted as data[s] (unless this raises an exception): x, ymin, ymax, colors
**kwargsLineCollection properties.

    See also  hlines

horizontal lines  axvline

vertical line across the Axes


matplotlib.pyplot.waitforbuttonpress   matplotlib.pyplot.waitforbuttonpress(timeout=- 1)[source]

Blocking call to interact with the figure. Wait for user input and return True if a key was pressed, False if a mouse button was pressed and None if no input was given within timeout seconds. Negative values deactivate timeout.
  Examples using matplotlib.pyplot.waitforbuttonpress

   Interactive functions


matplotlib.pyplot.winter   matplotlib.pyplot.winter()[source]

Set the colormap to 'winter'. This changes the default colormap as well as the colormap of the current image if there is one. See help(colormaps) for more information.


matplotlib.pyplot.xcorr   matplotlib.pyplot.xcorr(x, y, normed=True, detrend=<function detrend_none>, usevlines=True, maxlags=10, *, data=None, **kwargs)[source]

Plot the cross correlation between x and y. The correlation with lag k is defined as \(\sum_n x[n+k] \cdot y^*[n]\), where \(y^*\) is the complex conjugate of \(y\).  Parameters

x, yarray-like of length n

detrendcallable, default: mlab.detrend_none (no detrending)

A detrending function applied to x and y. It must have the signature detrend(x: np.ndarray) -> np.ndarray

normedbool, default: True

If True, input vectors are normalised to unit length.
usevlinesbool, default: True

Determines the plot style. If True, vertical lines are plotted from 0 to the xcorr value using Axes.vlines. Additionally, a horizontal line is plotted at y=0 using Axes.axhline. If False, markers are plotted at the xcorr values using Axes.plot.
maxlagsint, default: 10

Number of lags to show. If None, will return all 2 * len(x) - 1 lags.    Returns

lagsarray (length 2*maxlags+1)

The lag vector.
carray (length 2*maxlags+1)

The auto correlation vector.
lineLineCollection or Line2D

Artist added to the Axes of the correlation:
LineCollection if usevlines is True.
Line2D if usevlines is False.
bLine2D or None

Horizontal line at 0 if usevlines is True None usevlines is False.    Other Parameters

linestyleLine2D property, optional

The linestyle for plotting the data points. Only used if usevlines is False.
markerstr, default: 'o'

The marker for plotting the data points. Only used if usevlines is False.
dataindexable object, optional

If given, the following parameters also accept a string s, which is interpreted as data[s] (unless this raises an exception): x, y  **kwargs

Additional parameters are passed to Axes.vlines and Axes.axhline if usevlines is True; otherwise they are passed to Axes.plot.     Notes The cross correlation is performed with numpy.correlate with mode = "full".


matplotlib.pyplot.xkcd   matplotlib.pyplot.xkcd(scale=1, length=100, randomness=2)[source]

Turn on xkcd sketch-style drawing mode. This will only have effect on things drawn after this function is called. For best results, the "Humor Sans" font should be installed: it is not included with Matplotlib.  Parameters

scalefloat, optional

The amplitude of the wiggle perpendicular to the source line.
lengthfloat, optional

The length of the wiggle along the line.
randomnessfloat, optional

The scale factor by which the length is shrunken or expanded.     Notes This function works by a number of rcParams, so it will probably override others you have set before. If you want the effects of this function to be temporary, it can be used as a context manager, for example: with plt.xkcd():
    # This figure will be in XKCD-style
    fig1 = plt.figure()
    # ...

# This figure will be in regular style
fig2 = plt.figure()

  Examples using matplotlib.pyplot.xkcd

   XKCD


matplotlib.pyplot.xlabel   matplotlib.pyplot.xlabel(xlabel, fontdict=None, labelpad=None, *, loc=None, **kwargs)[source]

Set the label for the x-axis.  Parameters

xlabelstr

The label text.
labelpadfloat, default: rcParams["axes.labelpad"] (default: 4.0)

Spacing in points from the Axes bounding box including ticks and tick labels. If None, the previous value is left as is.
loc{'left', 'center', 'right'}, default: rcParams["xaxis.labellocation"] (default: 'center')

The label position. This is a high-level alternative for passing parameters x and horizontalalignment.    Other Parameters

**kwargsText properties

Text properties control the appearance of the label.      See also  text

Documents the properties supported by Text.
  Examples using matplotlib.pyplot.xlabel

   Scatter Symbol

   Multiple subplots

   Controlling style of text and labels using a dictionary

   Infinite lines

   Pyplot Mathtext

   Pyplot Text

   Solarized Light stylesheet

   Findobj Demo

   Custom scale

   Basic Usage

   Pyplot tutorial


matplotlib.pyplot.xlim   matplotlib.pyplot.xlim(*args, **kwargs)[source]

Get or set the x limits of the current axes. Call signatures: left, right = xlim()  # return the current xlim
xlim((left, right))   # set the xlim to left, right
xlim(left, right)     # set the xlim to left, right
 If you do not specify args, you can pass left or right as kwargs, i.e.: xlim(right=3)  # adjust the right leaving left unchanged
xlim(left=1)  # adjust the left leaving right unchanged
 Setting limits turns autoscaling off for the x-axis.  Returns
 left, right

A tuple of the new x-axis limits.     Notes Calling this function with no arguments (e.g. xlim()) is the pyplot equivalent of calling get_xlim on the current axes. Calling this function with arguments is the pyplot equivalent of calling set_xlim on the current axes. All arguments are passed though.
  Examples using matplotlib.pyplot.xlim

   Shared Axis

   Infinite lines

   Pyplot Text

   Frame grabbing

   Interactive functions


matplotlib.pyplot.xscale   matplotlib.pyplot.xscale(value, **kwargs)[source]

Set the x-axis scale.  Parameters

value{"linear", "log", "symlog", "logit", ...} or ScaleBase

The axis scale type to apply.  **kwargs

Different keyword arguments are accepted, depending on the scale. See the respective class keyword arguments:  matplotlib.scale.LinearScale matplotlib.scale.LogScale matplotlib.scale.SymmetricalLogScale matplotlib.scale.LogitScale matplotlib.scale.FuncScale      Notes By default, Matplotlib supports the above mentioned scales. Additionally, custom scales may be registered using matplotlib.scale.register_scale. These scales can then also be used here.


matplotlib.pyplot.xticks   matplotlib.pyplot.xticks(ticks=None, labels=None, **kwargs)[source]

Get or set the current tick locations and labels of the x-axis. Pass no arguments to return the current values without modifying them.  Parameters

ticksarray-like, optional

The list of xtick locations. Passing an empty list removes all xticks.
labelsarray-like, optional

The labels to place at the given ticks locations. This argument can only be passed if ticks is passed as well.  **kwargs

Text properties can be used to control the appearance of the labels.    Returns
 locs

The list of xtick locations.  labels

The list of xlabel Text objects.     Notes Calling this function with no arguments (e.g. xticks()) is the pyplot equivalent of calling get_xticks and get_xticklabels on the current axes. Calling this function with arguments is the pyplot equivalent of calling set_xticks and set_xticklabels on the current axes. Examples >>> locs, labels = xticks()  # Get the current locations and labels.
>>> xticks(np.arange(0, 1, step=0.2))  # Set label locations.
>>> xticks(np.arange(3), ['Tom', 'Dick', 'Sue'])  # Set text labels.
>>> xticks([0, 1, 2], ['January', 'February', 'March'],
...        rotation=20)  # Set text labels and properties.
>>> xticks([])  # Disable xticks.

  Examples using matplotlib.pyplot.xticks

   Secondary Axis

   Table Demo

   Rotating custom tick labels


matplotlib.pyplot.ylabel   matplotlib.pyplot.ylabel(ylabel, fontdict=None, labelpad=None, *, loc=None, **kwargs)[source]

Set the label for the y-axis.  Parameters

ylabelstr

The label text.
labelpadfloat, default: rcParams["axes.labelpad"] (default: 4.0)

Spacing in points from the Axes bounding box including ticks and tick labels. If None, the previous value is left as is.
loc{'bottom', 'center', 'top'}, default: rcParams["yaxis.labellocation"] (default: 'center')

The label position. This is a high-level alternative for passing parameters y and horizontalalignment.    Other Parameters

**kwargsText properties

Text properties control the appearance of the label.      See also  text

Documents the properties supported by Text.
  Examples using matplotlib.pyplot.ylabel

   Scatter Symbol

   Multiple subplots

   Controlling style of text and labels using a dictionary

   Pyplot Mathtext

   Pyplot Simple

   Pyplot Text

   Solarized Light stylesheet

   Findobj Demo

   Table Demo

   Custom scale

   Basic Usage

   Pyplot tutorial


matplotlib.pyplot.ylim   matplotlib.pyplot.ylim(*args, **kwargs)[source]

Get or set the y-limits of the current axes. Call signatures: bottom, top = ylim()  # return the current ylim
ylim((bottom, top))   # set the ylim to bottom, top
ylim(bottom, top)     # set the ylim to bottom, top
 If you do not specify args, you can alternatively pass bottom or top as kwargs, i.e.: ylim(top=3)  # adjust the top leaving bottom unchanged
ylim(bottom=1)  # adjust the bottom leaving top unchanged
 Setting limits turns autoscaling off for the y-axis.  Returns
 bottom, top

A tuple of the new y-axis limits.     Notes Calling this function with no arguments (e.g. ylim()) is the pyplot equivalent of calling get_ylim on the current axes. Calling this function with arguments is the pyplot equivalent of calling set_ylim on the current axes. All arguments are passed though.
  Examples using matplotlib.pyplot.ylim

   Infinite lines

   Pyplot Text

   Frame grabbing

   Interactive functions

   Findobj Demo

   Pyplot tutorial


matplotlib.pyplot.yscale   matplotlib.pyplot.yscale(value, **kwargs)[source]

Set the y-axis scale.  Parameters

value{"linear", "log", "symlog", "logit", ...} or ScaleBase

The axis scale type to apply.  **kwargs

Different keyword arguments are accepted, depending on the scale. See the respective class keyword arguments:  matplotlib.scale.LinearScale matplotlib.scale.LogScale matplotlib.scale.SymmetricalLogScale matplotlib.scale.LogitScale matplotlib.scale.FuncScale      Notes By default, Matplotlib supports the above mentioned scales. Additionally, custom scales may be registered using matplotlib.scale.register_scale. These scales can then also be used here.
  Examples using matplotlib.pyplot.yscale

   Custom scale

   Pyplot tutorial


matplotlib.pyplot.yticks   matplotlib.pyplot.yticks(ticks=None, labels=None, **kwargs)[source]

Get or set the current tick locations and labels of the y-axis. Pass no arguments to return the current values without modifying them.  Parameters

ticksarray-like, optional

The list of ytick locations. Passing an empty list removes all yticks.
labelsarray-like, optional

The labels to place at the given ticks locations. This argument can only be passed if ticks is passed as well.  **kwargs

Text properties can be used to control the appearance of the labels.    Returns
 locs

The list of ytick locations.  labels

The list of ylabel Text objects.     Notes Calling this function with no arguments (e.g. yticks()) is the pyplot equivalent of calling get_yticks and get_yticklabels on the current axes. Calling this function with arguments is the pyplot equivalent of calling set_yticks and set_yticklabels on the current axes. Examples >>> locs, labels = yticks()  # Get the current locations and labels.
>>> yticks(np.arange(0, 1, step=0.2))  # Set label locations.
>>> yticks(np.arange(3), ['Tom', 'Dick', 'Sue'])  # Set text labels.
>>> yticks([0, 1, 2], ['January', 'February', 'March'],
...        rotation=45)  # Set text labels and properties.
>>> yticks([])  # Disable yticks.

  Examples using matplotlib.pyplot.yticks

   Table Demo


matplotlib.quiver Support for plotting vector fields. Presently this contains Quiver and Barb. Quiver plots an arrow in the direction of the vector, with the size of the arrow related to the magnitude of the vector. Barbs are like quiver in that they point along a vector, but the magnitude of the vector is given schematically by the presence of barbs or flags on the barb. This will also become a home for things such as standard deviation ellipses, which can and will be derived very easily from the Quiver code.  Classes
Quiver(ax, *args[, scale, headwidth, ...]) Specialized PolyCollection for arrows.
QuiverKey(Q, X, Y, U, label, *[, angle, ...]) Labelled arrow for use as a quiver plot scale key.
Barbs(ax, *args[, pivot, length, barbcolor, ...]) Specialized PolyCollection for barbs.


matplotlib.quiver.Barbs   classmatplotlib.quiver.Barbs(ax, *args, pivot='tip', length=7, barbcolor=None, flagcolor=None, sizes=None, fill_empty=False, barb_increments=None, rounding=True, flip_barb=False, **kw)[source]

Bases: matplotlib.collections.PolyCollection Specialized PolyCollection for barbs. The only API method is set_UVC(), which can be used to change the size, orientation, and color of the arrows. Locations are changed using the set_offsets() collection method. Possibly this method will be useful in animations. There is one internal function _find_tails() which finds exactly what should be put on the barb given the vector magnitude. From there _make_barbs() is used to find the vertices of the polygon to represent the barb based on this information. The constructor takes one required argument, an Axes instance, followed by the args and kwargs described by the following pyplot interface documentation: Plot a 2D field of barbs. Call signature: barbs([X, Y], U, V, [C], **kw)
 Where X, Y define the barb locations, U, V define the barb directions, and C optionally sets the color. All arguments may be 1D or 2D. U, V, C may be masked arrays, but masked X, Y are not supported at present. Barbs are traditionally used in meteorology as a way to plot the speed and direction of wind observations, but can technically be used to plot any two dimensional vector quantity. As opposed to arrows, which give vector magnitude by the length of the arrow, the barbs give more quantitative information about the vector magnitude by putting slanted lines or a triangle for various increments in magnitude, as show schematically below: :                   /\    \
:                  /  \    \
:                 /    \    \    \
:                /      \    \    \
:               ------------------------------
 The largest increment is given by a triangle (or "flag"). After those come full lines (barbs). The smallest increment is a half line. There is only, of course, ever at most 1 half line. If the magnitude is small and only needs a single half-line and no full lines or triangles, the half-line is offset from the end of the barb so that it can be easily distinguished from barbs with a single full line. The magnitude for the barb shown above would nominally be 65, using the standard increments of 50, 10, and 5. See also https://en.wikipedia.org/wiki/Wind_barb.  Parameters

X, Y1D or 2D array-like, optional

The x and y coordinates of the barb locations. See pivot for how the barbs are drawn to the x, y positions. If not given, they will be generated as a uniform integer meshgrid based on the dimensions of U and V. If X and Y are 1D but U, V are 2D, X, Y are expanded to 2D using X, Y = np.meshgrid(X, Y). In this case len(X) and len(Y) must match the column and row dimensions of U and V.
U, V1D or 2D array-like

The x and y components of the barb shaft.
C1D or 2D array-like, optional

Numeric data that defines the barb colors by colormapping via norm and cmap. This does not support explicit colors. If you want to set colors directly, use barbcolor instead.
lengthfloat, default: 7

Length of the barb in points; the other parts of the barb are scaled against this.
pivot{'tip', 'middle'} or float, default: 'tip'

The part of the arrow that is anchored to the X, Y grid. The barb rotates about this point. This can also be a number, which shifts the start of the barb that many points away from grid point.
barbcolorcolor or color sequence

The color of all parts of the barb except for the flags. This parameter is analogous to the edgecolor parameter for polygons, which can be used instead. However this parameter will override facecolor.
flagcolorcolor or color sequence

The color of any flags on the barb. This parameter is analogous to the facecolor parameter for polygons, which can be used instead. However, this parameter will override facecolor. If this is not set (and C has not either) then flagcolor will be set to match barbcolor so that the barb has a uniform color. If C has been set, flagcolor has no effect.
sizesdict, optional

A dictionary of coefficients specifying the ratio of a given feature to the length of the barb. Only those values one wishes to override need to be included. These features include:  'spacing' - space between features (flags, full/half barbs) 'height' - height (distance from shaft to top) of a flag or full barb 'width' - width of a flag, twice the width of a full barb 'emptybarb' - radius of the circle used for low magnitudes
fill_emptybool, default: False

Whether the empty barbs (circles) that are drawn should be filled with the flag color. If they are not filled, the center is transparent.
roundingbool, default: True

Whether the vector magnitude should be rounded when allocating barb components. If True, the magnitude is rounded to the nearest multiple of the half-barb increment. If False, the magnitude is simply truncated to the next lowest multiple.
barb_incrementsdict, optional

A dictionary of increments specifying values to associate with different parts of the barb. Only those values one wishes to override need to be included.  'half' - half barbs (Default is 5) 'full' - full barbs (Default is 10) 'flag' - flags (default is 50)
flip_barbbool or array-like of bool, default: False

Whether the lines and flags should point opposite to normal. Normal behavior is for the barbs and lines to point right (comes from wind barbs having these features point towards low pressure in the Northern Hemisphere). A single value is applied to all barbs. Individual barbs can be flipped by passing a bool array of the same size as U and V.    Returns

barbsBarbs

  Other Parameters

dataindexable object, optional

DATA_PARAMETER_PLACEHOLDER  **kwargs

The barbs can further be customized using PolyCollection keyword arguments:
Property Description
agg_filter a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array
alpha array-like or scalar or None
animated bool
antialiased or aa or antialiaseds bool or list of bools
array array-like or None
capstyle CapStyle or {'butt', 'projecting', 'round'}
clim (vmin: float, vmax: float)
clip_box Bbox
clip_on bool
clip_path Patch or (Path, Transform) or None
cmap Colormap or str or None
color color or list of rgba tuples
edgecolor or ec or edgecolors color or list of colors or 'face'
facecolor or facecolors or fc color or list of colors
figure Figure
gid str
hatch {'/', '\', '|', '-', '+', 'x', 'o', 'O', '.', '*'}
in_layout bool
joinstyle JoinStyle or {'miter', 'round', 'bevel'}
label object
linestyle or dashes or linestyles or ls str or tuple or list thereof
linewidth or linewidths or lw float or list of floats
norm Normalize or None
offset_transform Transform
offsets (N, 2) or (2,) array-like
path_effects AbstractPathEffect
paths list of array-like
picker None or bool or float or callable
pickradius float
rasterized bool
sizes ndarray or None
sketch_params (scale: float, length: float, randomness: float)
snap bool or None
transform Transform
url str
urls list of str or None
verts list of array-like
verts_and_codes unknown
visible bool
zorder float         barbs_doc='\nPlot a 2D field of barbs.\n\nCall signature::\n\n barbs([X, Y], U, V, [C], **kw)\n\nWhere *X*, *Y* define the barb locations, *U*, *V* define the barb\ndirections, and *C* optionally sets the color.\n\nAll arguments may be 1D or 2D. *U*, *V*, *C* may be masked arrays, but masked\n*X*, *Y* are not supported at present.\n\nBarbs are traditionally used in meteorology as a way to plot the speed\nand direction of wind observations, but can technically be used to\nplot any two dimensional vector quantity. As opposed to arrows, which\ngive vector magnitude by the length of the arrow, the barbs give more\nquantitative information about the vector magnitude by putting slanted\nlines or a triangle for various increments in magnitude, as show\nschematically below::\n\n : /\\ \\\n : / \\ \\\n : / \\ \\ \\\n : / \\ \\ \\\n : ------------------------------\n\nThe largest increment is given by a triangle (or "flag"). After those\ncome full lines (barbs). The smallest increment is a half line. There\nis only, of course, ever at most 1 half line. If the magnitude is\nsmall and only needs a single half-line and no full lines or\ntriangles, the half-line is offset from the end of the barb so that it\ncan be easily distinguished from barbs with a single full line. The\nmagnitude for the barb shown above would nominally be 65, using the\nstandard increments of 50, 10, and 5.\n\nSee also https://en.wikipedia.org/wiki/Wind_barb.\n\nParameters\n----------\nX, Y : 1D or 2D array-like, optional\n The x and y coordinates of the barb locations. See *pivot* for how the\n barbs are drawn to the x, y positions.\n\n If not given, they will be generated as a uniform integer meshgrid based\n on the dimensions of *U* and *V*.\n\n If *X* and *Y* are 1D but *U*, *V* are 2D, *X*, *Y* are expanded to 2D\n using ``X, Y = np.meshgrid(X, Y)``. In this case ``len(X)`` and ``len(Y)``\n must match the column and row dimensions of *U* and *V*.\n\nU, V : 1D or 2D array-like\n The x and y components of the barb shaft.\n\nC : 1D or 2D array-like, optional\n Numeric data that defines the barb colors by colormapping via *norm* and\n *cmap*.\n\n This does not support explicit colors. If you want to set colors directly,\n use *barbcolor* instead.\n\nlength : float, default: 7\n Length of the barb in points; the other parts of the barb\n are scaled against this.\n\npivot : {\'tip\', \'middle\'} or float, default: \'tip\'\n The part of the arrow that is anchored to the *X*, *Y* grid. The barb\n rotates about this point. This can also be a number, which shifts the\n start of the barb that many points away from grid point.\n\nbarbcolor : color or color sequence\n The color of all parts of the barb except for the flags. This parameter\n is analogous to the *edgecolor* parameter for polygons, which can be used\n instead. However this parameter will override facecolor.\n\nflagcolor : color or color sequence\n The color of any flags on the barb. This parameter is analogous to the\n *facecolor* parameter for polygons, which can be used instead. However,\n this parameter will override facecolor. If this is not set (and *C* has\n not either) then *flagcolor* will be set to match *barbcolor* so that the\n barb has a uniform color. If *C* has been set, *flagcolor* has no effect.\n\nsizes : dict, optional\n A dictionary of coefficients specifying the ratio of a given\n feature to the length of the barb. Only those values one wishes to\n override need to be included. These features include:\n\n - \'spacing\' - space between features (flags, full/half barbs)\n - \'height\' - height (distance from shaft to top) of a flag or full barb\n - \'width\' - width of a flag, twice the width of a full barb\n - \'emptybarb\' - radius of the circle used for low magnitudes\n\nfill_empty : bool, default: False\n Whether the empty barbs (circles) that are drawn should be filled with\n the flag color. If they are not filled, the center is transparent.\n\nrounding : bool, default: True\n Whether the vector magnitude should be rounded when allocating barb\n components. If True, the magnitude is rounded to the nearest multiple\n of the half-barb increment. If False, the magnitude is simply truncated\n to the next lowest multiple.\n\nbarb_increments : dict, optional\n A dictionary of increments specifying values to associate with\n different parts of the barb. Only those values one wishes to\n override need to be included.\n\n - \'half\' - half barbs (Default is 5)\n - \'full\' - full barbs (Default is 10)\n - \'flag\' - flags (default is 50)\n\nflip_barb : bool or array-like of bool, default: False\n Whether the lines and flags should point opposite to normal.\n Normal behavior is for the barbs and lines to point right (comes from wind\n barbs having these features point towards low pressure in the Northern\n Hemisphere).\n\n A single value is applied to all barbs. Individual barbs can be flipped by\n passing a bool array of the same size as *U* and *V*.\n\nReturns\n-------\nbarbs : `~matplotlib.quiver.Barbs`\n\nOther Parameters\n----------------\ndata : indexable object, optional\n DATA_PARAMETER_PLACEHOLDER\n\n**kwargs\n The barbs can further be customized using `.PolyCollection` keyword\n arguments:\n\n \n .. table::\n :class: property-table\n\n ================================================================================================= =====================================================================================================\n Property Description \n ================================================================================================= =====================================================================================================\n :meth:`agg_filter <matplotlib.artist.Artist.set_agg_filter>` a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array\n :meth:`alpha <matplotlib.collections.Collection.set_alpha>` array-like or scalar or None \n :meth:`animated <matplotlib.artist.Artist.set_animated>` bool \n :meth:`antialiased <matplotlib.collections.Collection.set_antialiased>` or aa or antialiaseds bool or list of bools \n :meth:`array <matplotlib.cm.ScalarMappable.set_array>` array-like or None \n :meth:`capstyle <matplotlib.collections.Collection.set_capstyle>` `.CapStyle` or {\'butt\', \'projecting\', \'round\'} \n :meth:`clim <matplotlib.cm.ScalarMappable.set_clim>` (vmin: float, vmax: float) \n :meth:`clip_box <matplotlib.artist.Artist.set_clip_box>` `.Bbox` \n :meth:`clip_on <matplotlib.artist.Artist.set_clip_on>` bool \n :meth:`clip_path <matplotlib.artist.Artist.set_clip_path>` Patch or (Path, Transform) or None \n :meth:`cmap <matplotlib.cm.ScalarMappable.set_cmap>` `.Colormap` or str or None \n :meth:`color <matplotlib.collections.Collection.set_color>` color or list of rgba tuples \n :meth:`edgecolor <matplotlib.collections.Collection.set_edgecolor>` or ec or edgecolors color or list of colors or \'face\' \n :meth:`facecolor <matplotlib.collections.Collection.set_facecolor>` or facecolors or fc color or list of colors \n :meth:`figure <matplotlib.artist.Artist.set_figure>` `.Figure` \n :meth:`gid <matplotlib.artist.Artist.set_gid>` str \n :meth:`hatch <matplotlib.collections.Collection.set_hatch>` {\'/\', \'\\\\\', \'|\', \'-\', \'+\', \'x\', \'o\', \'O\', \'.\', \'*\'} \n :meth:`in_layout <matplotlib.artist.Artist.set_in_layout>` bool \n :meth:`joinstyle <matplotlib.collections.Collection.set_joinstyle>` `.JoinStyle` or {\'miter\', \'round\', \'bevel\'} \n :meth:`label <matplotlib.artist.Artist.set_label>` object \n :meth:`linestyle <matplotlib.collections.Collection.set_linestyle>` or dashes or linestyles or ls str or tuple or list thereof \n :meth:`linewidth <matplotlib.collections.Collection.set_linewidth>` or linewidths or lw float or list of floats \n :meth:`norm <matplotlib.cm.ScalarMappable.set_norm>` `.Normalize` or None \n :meth:`offset_transform <matplotlib.collections.Collection.set_offset_transform>` `.Transform` \n :meth:`offsets <matplotlib.collections.Collection.set_offsets>` (N, 2) or (2,) array-like \n :meth:`path_effects <matplotlib.artist.Artist.set_path_effects>` `.AbstractPathEffect` \n :meth:`paths <matplotlib.collections.PolyCollection.set_verts>` list of array-like \n :meth:`picker <matplotlib.artist.Artist.set_picker>` None or bool or float or callable \n :meth:`pickradius <matplotlib.collections.Collection.set_pickradius>` float \n :meth:`rasterized <matplotlib.artist.Artist.set_rasterized>` bool \n :meth:`sizes <matplotlib.collections._CollectionWithSizes.set_sizes>` ndarray or None \n :meth:`sketch_params <matplotlib.artist.Artist.set_sketch_params>` (scale: float, length: float, randomness: float) \n :meth:`snap <matplotlib.artist.Artist.set_snap>` bool or None \n :meth:`transform <matplotlib.artist.Artist.set_transform>` `.Transform` \n :meth:`url <matplotlib.artist.Artist.set_url>` str \n :meth:`urls <matplotlib.collections.Collection.set_urls>` list of str or None \n :meth:`verts <matplotlib.collections.PolyCollection.set_verts>` list of array-like \n :meth:`verts_and_codes <matplotlib.collections.PolyCollection.set_verts_and_codes>` unknown \n :meth:`visible <matplotlib.artist.Artist.set_visible>` bool \n :meth:`zorder <matplotlib.artist.Artist.set_zorder>` float \n ================================================================================================= =====================================================================================================\n\n'

   set(*, UVC=<UNSET>, agg_filter=<UNSET>, alpha=<UNSET>, animated=<UNSET>, antialiased=<UNSET>, array=<UNSET>, capstyle=<UNSET>, clim=<UNSET>, clip_box=<UNSET>, clip_on=<UNSET>, clip_path=<UNSET>, cmap=<UNSET>, color=<UNSET>, edgecolor=<UNSET>, facecolor=<UNSET>, gid=<UNSET>, hatch=<UNSET>, in_layout=<UNSET>, joinstyle=<UNSET>, label=<UNSET>, linestyle=<UNSET>, linewidth=<UNSET>, norm=<UNSET>, offset_transform=<UNSET>, offsets=<UNSET>, path_effects=<UNSET>, paths=<UNSET>, picker=<UNSET>, pickradius=<UNSET>, rasterized=<UNSET>, sizes=<UNSET>, sketch_params=<UNSET>, snap=<UNSET>, transform=<UNSET>, url=<UNSET>, urls=<UNSET>, verts=<UNSET>, verts_and_codes=<UNSET>, visible=<UNSET>, zorder=<UNSET>)[source]

Set multiple properties at once. Supported properties are
Property Description
UVC unknown
agg_filter a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array
alpha array-like or scalar or None
animated bool
antialiased or aa or antialiaseds bool or list of bools
array array-like or None
capstyle CapStyle or {'butt', 'projecting', 'round'}
clim (vmin: float, vmax: float)
clip_box Bbox
clip_on bool
clip_path Patch or (Path, Transform) or None
cmap Colormap or str or None
color color or list of rgba tuples
edgecolor or ec or edgecolors color or list of colors or 'face'
facecolor or facecolors or fc color or list of colors
figure Figure
gid str
hatch {'/', '\', '|', '-', '+', 'x', 'o', 'O', '.', '*'}
in_layout bool
joinstyle JoinStyle or {'miter', 'round', 'bevel'}
label object
linestyle or dashes or linestyles or ls str or tuple or list thereof
linewidth or linewidths or lw float or list of floats
norm Normalize or None
offset_transform Transform
offsets sequence of pairs of floats
path_effects AbstractPathEffect
paths list of array-like
picker None or bool or float or callable
pickradius float
rasterized bool
sizes ndarray or None
sketch_params (scale: float, length: float, randomness: float)
snap bool or None
transform Transform
url str
urls list of str or None
verts list of array-like
verts_and_codes unknown
visible bool
zorder float
   set_UVC(U, V, C=None)[source]

   set_offsets(xy)[source]

Set the offsets for the barb polygons. This saves the offsets passed in and masks them as appropriate for the existing U/V data.  Parameters

xysequence of pairs of floats


barbs_doc='\nPlot a 2D field of barbs.\n\nCall signature::\n\n barbs([X, Y], U, V, [C], **kw)\n\nWhere *X*, *Y* define the barb locations, *U*, *V* define the barb\ndirections, and *C* optionally sets the color.\n\nAll arguments may be 1D or 2D. *U*, *V*, *C* may be masked arrays, but masked\n*X*, *Y* are not supported at present.\n\nBarbs are traditionally used in meteorology as a way to plot the speed\nand direction of wind observations, but can technically be used to\nplot any two dimensional vector quantity. As opposed to arrows, which\ngive vector magnitude by the length of the arrow, the barbs give more\nquantitative information about the vector magnitude by putting slanted\nlines or a triangle for various increments in magnitude, as show\nschematically below::\n\n : /\\ \\\n : / \\ \\\n : / \\ \\ \\\n : / \\ \\ \\\n : ------------------------------\n\nThe largest increment is given by a triangle (or "flag"). After those\ncome full lines (barbs). The smallest increment is a half line. There\nis only, of course, ever at most 1 half line. If the magnitude is\nsmall and only needs a single half-line and no full lines or\ntriangles, the half-line is offset from the end of the barb so that it\ncan be easily distinguished from barbs with a single full line. The\nmagnitude for the barb shown above would nominally be 65, using the\nstandard increments of 50, 10, and 5.\n\nSee also https://en.wikipedia.org/wiki/Wind_barb.\n\nParameters\n----------\nX, Y : 1D or 2D array-like, optional\n The x and y coordinates of the barb locations. See *pivot* for how the\n barbs are drawn to the x, y positions.\n\n If not given, they will be generated as a uniform integer meshgrid based\n on the dimensions of *U* and *V*.\n\n If *X* and *Y* are 1D but *U*, *V* are 2D, *X*, *Y* are expanded to 2D\n using ``X, Y = np.meshgrid(X, Y)``. In this case ``len(X)`` and ``len(Y)``\n must match the column and row dimensions of *U* and *V*.\n\nU, V : 1D or 2D array-like\n The x and y components of the barb shaft.\n\nC : 1D or 2D array-like, optional\n Numeric data that defines the barb colors by colormapping via *norm* and\n *cmap*.\n\n This does not support explicit colors. If you want to set colors directly,\n use *barbcolor* instead.\n\nlength : float, default: 7\n Length of the barb in points; the other parts of the barb\n are scaled against this.\n\npivot : {\'tip\', \'middle\'} or float, default: \'tip\'\n The part of the arrow that is anchored to the *X*, *Y* grid. The barb\n rotates about this point. This can also be a number, which shifts the\n start of the barb that many points away from grid point.\n\nbarbcolor : color or color sequence\n The color of all parts of the barb except for the flags. This parameter\n is analogous to the *edgecolor* parameter for polygons, which can be used\n instead. However this parameter will override facecolor.\n\nflagcolor : color or color sequence\n The color of any flags on the barb. This parameter is analogous to the\n *facecolor* parameter for polygons, which can be used instead. However,\n this parameter will override facecolor. If this is not set (and *C* has\n not either) then *flagcolor* will be set to match *barbcolor* so that the\n barb has a uniform color. If *C* has been set, *flagcolor* has no effect.\n\nsizes : dict, optional\n A dictionary of coefficients specifying the ratio of a given\n feature to the length of the barb. Only those values one wishes to\n override need to be included. These features include:\n\n - \'spacing\' - space between features (flags, full/half barbs)\n - \'height\' - height (distance from shaft to top) of a flag or full barb\n - \'width\' - width of a flag, twice the width of a full barb\n - \'emptybarb\' - radius of the circle used for low magnitudes\n\nfill_empty : bool, default: False\n Whether the empty barbs (circles) that are drawn should be filled with\n the flag color. If they are not filled, the center is transparent.\n\nrounding : bool, default: True\n Whether the vector magnitude should be rounded when allocating barb\n components. If True, the magnitude is rounded to the nearest multiple\n of the half-barb increment. If False, the magnitude is simply truncated\n to the next lowest multiple.\n\nbarb_increments : dict, optional\n A dictionary of increments specifying values to associate with\n different parts of the barb. Only those values one wishes to\n override need to be included.\n\n - \'half\' - half barbs (Default is 5)\n - \'full\' - full barbs (Default is 10)\n - \'flag\' - flags (default is 50)\n\nflip_barb : bool or array-like of bool, default: False\n Whether the lines and flags should point opposite to normal.\n Normal behavior is for the barbs and lines to point right (comes from wind\n barbs having these features point towards low pressure in the Northern\n Hemisphere).\n\n A single value is applied to all barbs. Individual barbs can be flipped by\n passing a bool array of the same size as *U* and *V*.\n\nReturns\n-------\nbarbs : `~matplotlib.quiver.Barbs`\n\nOther Parameters\n----------------\ndata : indexable object, optional\n DATA_PARAMETER_PLACEHOLDER\n\n**kwargs\n The barbs can further be customized using `.PolyCollection` keyword\n arguments:\n\n \n .. table::\n :class: property-table\n\n ================================================================================================= =====================================================================================================\n Property Description \n ================================================================================================= =====================================================================================================\n :meth:`agg_filter <matplotlib.artist.Artist.set_agg_filter>` a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array\n :meth:`alpha <matplotlib.collections.Collection.set_alpha>` array-like or scalar or None \n :meth:`animated <matplotlib.artist.Artist.set_animated>` bool \n :meth:`antialiased <matplotlib.collections.Collection.set_antialiased>` or aa or antialiaseds bool or list of bools \n :meth:`array <matplotlib.cm.ScalarMappable.set_array>` array-like or None \n :meth:`capstyle <matplotlib.collections.Collection.set_capstyle>` `.CapStyle` or {\'butt\', \'projecting\', \'round\'} \n :meth:`clim <matplotlib.cm.ScalarMappable.set_clim>` (vmin: float, vmax: float) \n :meth:`clip_box <matplotlib.artist.Artist.set_clip_box>` `.Bbox` \n :meth:`clip_on <matplotlib.artist.Artist.set_clip_on>` bool \n :meth:`clip_path <matplotlib.artist.Artist.set_clip_path>` Patch or (Path, Transform) or None \n :meth:`cmap <matplotlib.cm.ScalarMappable.set_cmap>` `.Colormap` or str or None \n :meth:`color <matplotlib.collections.Collection.set_color>` color or list of rgba tuples \n :meth:`edgecolor <matplotlib.collections.Collection.set_edgecolor>` or ec or edgecolors color or list of colors or \'face\' \n :meth:`facecolor <matplotlib.collections.Collection.set_facecolor>` or facecolors or fc color or list of colors \n :meth:`figure <matplotlib.artist.Artist.set_figure>` `.Figure` \n :meth:`gid <matplotlib.artist.Artist.set_gid>` str \n :meth:`hatch <matplotlib.collections.Collection.set_hatch>` {\'/\', \'\\\\\', \'|\', \'-\', \'+\', \'x\', \'o\', \'O\', \'.\', \'*\'} \n :meth:`in_layout <matplotlib.artist.Artist.set_in_layout>` bool \n :meth:`joinstyle <matplotlib.collections.Collection.set_joinstyle>` `.JoinStyle` or {\'miter\', \'round\', \'bevel\'} \n :meth:`label <matplotlib.artist.Artist.set_label>` object \n :meth:`linestyle <matplotlib.collections.Collection.set_linestyle>` or dashes or linestyles or ls str or tuple or list thereof \n :meth:`linewidth <matplotlib.collections.Collection.set_linewidth>` or linewidths or lw float or list of floats \n :meth:`norm <matplotlib.cm.ScalarMappable.set_norm>` `.Normalize` or None \n :meth:`offset_transform <matplotlib.collections.Collection.set_offset_transform>` `.Transform` \n :meth:`offsets <matplotlib.collections.Collection.set_offsets>` (N, 2) or (2,) array-like \n :meth:`path_effects <matplotlib.artist.Artist.set_path_effects>` `.AbstractPathEffect` \n :meth:`paths <matplotlib.collections.PolyCollection.set_verts>` list of array-like \n :meth:`picker <matplotlib.artist.Artist.set_picker>` None or bool or float or callable \n :meth:`pickradius <matplotlib.collections.Collection.set_pickradius>` float \n :meth:`rasterized <matplotlib.artist.Artist.set_rasterized>` bool \n :meth:`sizes <matplotlib.collections._CollectionWithSizes.set_sizes>` ndarray or None \n :meth:`sketch_params <matplotlib.artist.Artist.set_sketch_params>` (scale: float, length: float, randomness: float) \n :meth:`snap <matplotlib.artist.Artist.set_snap>` bool or None \n :meth:`transform <matplotlib.artist.Artist.set_transform>` `.Transform` \n :meth:`url <matplotlib.artist.Artist.set_url>` str \n :meth:`urls <matplotlib.collections.Collection.set_urls>` list of str or None \n :meth:`verts <matplotlib.collections.PolyCollection.set_verts>` list of array-like \n :meth:`verts_and_codes <matplotlib.collections.PolyCollection.set_verts_and_codes>` unknown \n :meth:`visible <matplotlib.artist.Artist.set_visible>` bool \n :meth:`zorder <matplotlib.artist.Artist.set_zorder>` float \n ================================================================================================= =====================================================================================================\n\n'


set(*, UVC=<UNSET>, agg_filter=<UNSET>, alpha=<UNSET>, animated=<UNSET>, antialiased=<UNSET>, array=<UNSET>, capstyle=<UNSET>, clim=<UNSET>, clip_box=<UNSET>, clip_on=<UNSET>, clip_path=<UNSET>, cmap=<UNSET>, color=<UNSET>, edgecolor=<UNSET>, facecolor=<UNSET>, gid=<UNSET>, hatch=<UNSET>, in_layout=<UNSET>, joinstyle=<UNSET>, label=<UNSET>, linestyle=<UNSET>, linewidth=<UNSET>, norm=<UNSET>, offset_transform=<UNSET>, offsets=<UNSET>, path_effects=<UNSET>, paths=<UNSET>, picker=<UNSET>, pickradius=<UNSET>, rasterized=<UNSET>, sizes=<UNSET>, sketch_params=<UNSET>, snap=<UNSET>, transform=<UNSET>, url=<UNSET>, urls=<UNSET>, verts=<UNSET>, verts_and_codes=<UNSET>, visible=<UNSET>, zorder=<UNSET>)[source]

Set multiple properties at once. Supported properties are
Property Description
UVC unknown
agg_filter a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array
alpha array-like or scalar or None
animated bool
antialiased or aa or antialiaseds bool or list of bools
array array-like or None
capstyle CapStyle or {'butt', 'projecting', 'round'}
clim (vmin: float, vmax: float)
clip_box Bbox
clip_on bool
clip_path Patch or (Path, Transform) or None
cmap Colormap or str or None
color color or list of rgba tuples
edgecolor or ec or edgecolors color or list of colors or 'face'
facecolor or facecolors or fc color or list of colors
figure Figure
gid str
hatch {'/', '\', '|', '-', '+', 'x', 'o', 'O', '.', '*'}
in_layout bool
joinstyle JoinStyle or {'miter', 'round', 'bevel'}
label object
linestyle or dashes or linestyles or ls str or tuple or list thereof
linewidth or linewidths or lw float or list of floats
norm Normalize or None
offset_transform Transform
offsets sequence of pairs of floats
path_effects AbstractPathEffect
paths list of array-like
picker None or bool or float or callable
pickradius float
rasterized bool
sizes ndarray or None
sketch_params (scale: float, length: float, randomness: float)
snap bool or None
transform Transform
url str
urls list of str or None
verts list of array-like
verts_and_codes unknown
visible bool
zorder float


set_offsets(xy)[source]

Set the offsets for the barb polygons. This saves the offsets passed in and masks them as appropriate for the existing U/V data.  Parameters

xysequence of pairs of floats


matplotlib.quiver.Quiver   classmatplotlib.quiver.Quiver(ax, *args, scale=None, headwidth=3, headlength=5, headaxislength=4.5, minshaft=1, minlength=1, units='width', scale_units=None, angles='uv', width=None, color='k', pivot='tail', **kw)[source]

Bases: matplotlib.collections.PolyCollection Specialized PolyCollection for arrows. The only API method is set_UVC(), which can be used to change the size, orientation, and color of the arrows; their locations are fixed when the class is instantiated. Possibly this method will be useful in animations. Much of the work in this class is done in the draw() method so that as much information as possible is available about the plot. In subsequent draw() calls, recalculation is limited to things that might have changed, so there should be no performance penalty from putting the calculations in the draw() method. The constructor takes one required argument, an Axes instance, followed by the args and kwargs described by the following pyplot interface documentation: Plot a 2D field of arrows. Call signature: quiver([X, Y], U, V, [C], **kw)
 X, Y define the arrow locations, U, V define the arrow directions, and C optionally sets the color. Each arrow is internally represented by a filled polygon with a default edge linewidth of 0. As a result, an arrow is rather a filled area, not a line with a head, and PolyCollection properties like linewidth, linestyle, facecolor, etc. act accordingly. Arrow size The default settings auto-scales the length of the arrows to a reasonable size. To change this behavior see the scale and scale_units parameters. Arrow shape The defaults give a slightly swept-back arrow; to make the head a triangle, make headaxislength the same as headlength. To make the arrow more pointed, reduce headwidth or increase headlength and headaxislength. To make the head smaller relative to the shaft, scale down all the head parameters. You will probably do best to leave minshaft alone. Arrow outline linewidths and edgecolors can be used to customize the arrow outlines.  Parameters

X, Y1D or 2D array-like, optional

The x and y coordinates of the arrow locations. If not given, they will be generated as a uniform integer meshgrid based on the dimensions of U and V. If X and Y are 1D but U, V are 2D, X, Y are expanded to 2D using X, Y = np.meshgrid(X, Y). In this case len(X) and len(Y) must match the column and row dimensions of U and V.
U, V1D or 2D array-like

The x and y direction components of the arrow vectors. They must have the same number of elements, matching the number of arrow locations. U and V may be masked. Only locations unmasked in U, V, and C will be drawn.
C1D or 2D array-like, optional

Numeric data that defines the arrow colors by colormapping via norm and cmap. This does not support explicit colors. If you want to set colors directly, use color instead. The size of C must match the number of arrow locations.
units{'width', 'height', 'dots', 'inches', 'x', 'y', 'xy'}, default: 'width'

The arrow dimensions (except for length) are measured in multiples of this unit. The following values are supported:  'width', 'height': The width or height of the axis. 'dots', 'inches': Pixels or inches based on the figure dpi. 'x', 'y', 'xy': X, Y or \(\sqrt{X^2 + Y^2}\) 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.
angles{'uv', 'xy'} or array-like, default: 'uv'

Method for determining the angle of the arrows.
'uv': The arrow axis aspect ratio is 1 so that if U == V the orientation of the arrow on the plot is 45 degrees counter-clockwise from the horizontal axis (positive to the right). Use this if the arrows symbolize a quantity that is not based on X, Y data coordinates.  'xy': Arrows point from (x, y) to (x+u, y+v). Use this for plotting a gradient field, for example.
Alternatively, arbitrary angles may be specified explicitly as an array of values in degrees, counter-clockwise from the horizontal axis. In this case U, V is only used to determine the length of the arrows.   Note: inverting a data axis will correspondingly invert the arrows only with angles='xy'.
scalefloat, optional

Number of data units per arrow length unit, e.g., m/s per plot width; a smaller scale parameter makes the arrow longer. Default is None. If None, a simple autoscaling algorithm is used, based on the average vector length and the number of vectors. The arrow length unit is given by the scale_units parameter.
scale_units{'width', 'height', 'dots', 'inches', 'x', 'y', 'xy'}, optional

If the scale kwarg is None, the arrow length unit. Default is None. e.g. scale_units is 'inches', scale is 2.0, and (u, v) = (1, 0), then the vector will be 0.5 inches long. If scale_units is 'width' or 'height', then the vector will be half the width/height of the axes. If scale_units is 'x' then the vector will be 0.5 x-axis units. To plot vectors in the x-y plane, with u and v having the same units as x and y, use angles='xy', scale_units='xy', scale=1.
widthfloat, optional

Shaft width in arrow units; default depends on choice of units, above, and number of vectors; a typical starting value is about 0.005 times the width of the plot.
headwidthfloat, default: 3

Head width as multiple of shaft width.
headlengthfloat, default: 5

Head length as multiple of shaft width.
headaxislengthfloat, default: 4.5

Head length at shaft intersection.
minshaftfloat, default: 1

Length below which arrow scales, in units of head length. Do not set this to less than 1, or small arrows will look terrible!
minlengthfloat, default: 1

Minimum length as a multiple of shaft width; if an arrow length is less than this, plot a dot (hexagon) of this diameter instead.
pivot{'tail', 'mid', 'middle', 'tip'}, default: 'tail'

The part of the arrow that is anchored to the X, Y grid. The arrow rotates about this point. 'mid' is a synonym for 'middle'.
colorcolor or color sequence, optional

Explicit color(s) for the arrows. If C has been set, color has no effect. This is a synonym for the PolyCollection facecolor parameter.    Returns
 Quiver
  Other Parameters

dataindexable object, optional

DATA_PARAMETER_PLACEHOLDER
**kwargsPolyCollection properties, optional

All other keyword arguments are passed on to PolyCollection:
Property Description
agg_filter a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array
alpha array-like or scalar or None
animated bool
antialiased or aa or antialiaseds bool or list of bools
array array-like or None
capstyle CapStyle or {'butt', 'projecting', 'round'}
clim (vmin: float, vmax: float)
clip_box Bbox
clip_on bool
clip_path Patch or (Path, Transform) or None
cmap Colormap or str or None
color color or list of rgba tuples
edgecolor or ec or edgecolors color or list of colors or 'face'
facecolor or facecolors or fc color or list of colors
figure Figure
gid str
hatch {'/', '\', '|', '-', '+', 'x', 'o', 'O', '.', '*'}
in_layout bool
joinstyle JoinStyle or {'miter', 'round', 'bevel'}
label object
linestyle or dashes or linestyles or ls str or tuple or list thereof
linewidth or linewidths or lw float or list of floats
norm Normalize or None
offset_transform Transform
offsets (N, 2) or (2,) array-like
path_effects AbstractPathEffect
paths list of array-like
picker None or bool or float or callable
pickradius float
rasterized bool
sizes ndarray or None
sketch_params (scale: float, length: float, randomness: float)
snap bool or None
transform Transform
url str
urls list of str or None
verts list of array-like
verts_and_codes unknown
visible bool
zorder float        See also  Axes.quiverkey

Add a key to a quiver plot.      draw(renderer)[source]

Draw the Artist (and its children) using the given renderer. This has no effect if the artist is not visible (Artist.get_visible returns False).  Parameters

rendererRendererBase subclass.

   Notes This method is overridden in the Artist subclasses.
   get_datalim(transData)[source]

   quiver_doc="\nPlot a 2D field of arrows.\n\nCall signature::\n\n quiver([X, Y], U, V, [C], **kw)\n\n*X*, *Y* define the arrow locations, *U*, *V* define the arrow directions, and\n*C* optionally sets the color.\n\nEach arrow is internally represented by a filled polygon with a default edge\nlinewidth of 0. As a result, an arrow is rather a filled area, not a line with\na head, and `.PolyCollection` properties like *linewidth*, *linestyle*,\n*facecolor*, etc. act accordingly.\n\n**Arrow size**\n\nThe default settings auto-scales the length of the arrows to a reasonable size.\nTo change this behavior see the *scale* and *scale_units* parameters.\n\n**Arrow shape**\n\nThe defaults give a slightly swept-back arrow; to make the head a\ntriangle, make *headaxislength* the same as *headlength*. To make the\narrow more pointed, reduce *headwidth* or increase *headlength* and\n*headaxislength*. To make the head smaller relative to the shaft,\nscale down all the head parameters. You will probably do best to leave\nminshaft alone.\n\n**Arrow outline**\n\n*linewidths* and *edgecolors* can be used to customize the arrow\noutlines.\n\nParameters\n----------\nX, Y : 1D or 2D array-like, optional\n The x and y coordinates of the arrow locations.\n\n If not given, they will be generated as a uniform integer meshgrid based\n on the dimensions of *U* and *V*.\n\n If *X* and *Y* are 1D but *U*, *V* are 2D, *X*, *Y* are expanded to 2D\n using ``X, Y = np.meshgrid(X, Y)``. In this case ``len(X)`` and ``len(Y)``\n must match the column and row dimensions of *U* and *V*.\n\nU, V : 1D or 2D array-like\n The x and y direction components of the arrow vectors.\n\n They must have the same number of elements, matching the number of arrow\n locations. *U* and *V* may be masked. Only locations unmasked in\n *U*, *V*, and *C* will be drawn.\n\nC : 1D or 2D array-like, optional\n Numeric data that defines the arrow colors by colormapping via *norm* and\n *cmap*.\n\n This does not support explicit colors. If you want to set colors directly,\n use *color* instead. The size of *C* must match the number of arrow\n locations.\n\nunits : {'width', 'height', 'dots', 'inches', 'x', 'y', 'xy'}, default: 'width'\n The arrow dimensions (except for *length*) are measured in multiples of\n this unit.\n\n The following values are supported:\n\n - 'width', 'height': The width or height of the axis.\n - 'dots', 'inches': Pixels or inches based on the figure dpi.\n - 'x', 'y', 'xy': *X*, *Y* or :math:`\\sqrt{X^2 + Y^2}` in data units.\n\n The arrows scale differently depending on the units. For\n 'x' or 'y', the arrows get larger as one zooms in; for other\n units, the arrow size is independent of the zoom state. For\n 'width or 'height', the arrow size increases with the width and\n height of the axes, respectively, when the window is resized;\n for 'dots' or 'inches', resizing does not change the arrows.\n\nangles : {'uv', 'xy'} or array-like, default: 'uv'\n Method for determining the angle of the arrows.\n\n - 'uv': The arrow axis aspect ratio is 1 so that\n if *U* == *V* the orientation of the arrow on the plot is 45 degrees\n counter-clockwise from the horizontal axis (positive to the right).\n\n Use this if the arrows symbolize a quantity that is not based on\n *X*, *Y* data coordinates.\n\n - 'xy': Arrows point from (x, y) to (x+u, y+v).\n Use this for plotting a gradient field, for example.\n\n - Alternatively, arbitrary angles may be specified explicitly as an array\n of values in degrees, counter-clockwise from the horizontal axis.\n\n In this case *U*, *V* is only used to determine the length of the\n arrows.\n\n Note: inverting a data axis will correspondingly invert the\n arrows only with ``angles='xy'``.\n\nscale : float, optional\n Number of data units per arrow length unit, e.g., m/s per plot width; a\n smaller scale parameter makes the arrow longer. Default is *None*.\n\n If *None*, a simple autoscaling algorithm is used, based on the average\n vector length and the number of vectors. The arrow length unit is given by\n the *scale_units* parameter.\n\nscale_units : {'width', 'height', 'dots', 'inches', 'x', 'y', 'xy'}, optional\n If the *scale* kwarg is *None*, the arrow length unit. Default is *None*.\n\n e.g. *scale_units* is 'inches', *scale* is 2.0, and ``(u, v) = (1, 0)``,\n then the vector will be 0.5 inches long.\n\n If *scale_units* is 'width' or 'height', then the vector will be half the\n width/height of the axes.\n\n If *scale_units* is 'x' then the vector will be 0.5 x-axis\n units. To plot vectors in the x-y plane, with u and v having\n the same units as x and y, use\n ``angles='xy', scale_units='xy', scale=1``.\n\nwidth : float, optional\n Shaft width in arrow units; default depends on choice of units,\n above, and number of vectors; a typical starting value is about\n 0.005 times the width of the plot.\n\nheadwidth : float, default: 3\n Head width as multiple of shaft width.\n\nheadlength : float, default: 5\n Head length as multiple of shaft width.\n\nheadaxislength : float, default: 4.5\n Head length at shaft intersection.\n\nminshaft : float, default: 1\n Length below which arrow scales, in units of head length. Do not\n set this to less than 1, or small arrows will look terrible!\n\nminlength : float, default: 1\n Minimum length as a multiple of shaft width; if an arrow length\n is less than this, plot a dot (hexagon) of this diameter instead.\n\npivot : {'tail', 'mid', 'middle', 'tip'}, default: 'tail'\n The part of the arrow that is anchored to the *X*, *Y* grid. The arrow\n rotates about this point.\n\n 'mid' is a synonym for 'middle'.\n\ncolor : color or color sequence, optional\n Explicit color(s) for the arrows. If *C* has been set, *color* has no\n effect.\n\n This is a synonym for the `.PolyCollection` *facecolor* parameter.\n\nOther Parameters\n----------------\ndata : indexable object, optional\n DATA_PARAMETER_PLACEHOLDER\n\n**kwargs : `~matplotlib.collections.PolyCollection` properties, optional\n All other keyword arguments are passed on to `.PolyCollection`:\n\n \n .. table::\n :class: property-table\n\n ================================================================================================= =====================================================================================================\n Property Description \n ================================================================================================= =====================================================================================================\n :meth:`agg_filter <matplotlib.artist.Artist.set_agg_filter>` a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array\n :meth:`alpha <matplotlib.collections.Collection.set_alpha>` array-like or scalar or None \n :meth:`animated <matplotlib.artist.Artist.set_animated>` bool \n :meth:`antialiased <matplotlib.collections.Collection.set_antialiased>` or aa or antialiaseds bool or list of bools \n :meth:`array <matplotlib.cm.ScalarMappable.set_array>` array-like or None \n :meth:`capstyle <matplotlib.collections.Collection.set_capstyle>` `.CapStyle` or {'butt', 'projecting', 'round'} \n :meth:`clim <matplotlib.cm.ScalarMappable.set_clim>` (vmin: float, vmax: float) \n :meth:`clip_box <matplotlib.artist.Artist.set_clip_box>` `.Bbox` \n :meth:`clip_on <matplotlib.artist.Artist.set_clip_on>` bool \n :meth:`clip_path <matplotlib.artist.Artist.set_clip_path>` Patch or (Path, Transform) or None \n :meth:`cmap <matplotlib.cm.ScalarMappable.set_cmap>` `.Colormap` or str or None \n :meth:`color <matplotlib.collections.Collection.set_color>` color or list of rgba tuples \n :meth:`edgecolor <matplotlib.collections.Collection.set_edgecolor>` or ec or edgecolors color or list of colors or 'face' \n :meth:`facecolor <matplotlib.collections.Collection.set_facecolor>` or facecolors or fc color or list of colors \n :meth:`figure <matplotlib.artist.Artist.set_figure>` `.Figure` \n :meth:`gid <matplotlib.artist.Artist.set_gid>` str \n :meth:`hatch <matplotlib.collections.Collection.set_hatch>` {'/', '\\\\', '|', '-', '+', 'x', 'o', 'O', '.', '*'} \n :meth:`in_layout <matplotlib.artist.Artist.set_in_layout>` bool \n :meth:`joinstyle <matplotlib.collections.Collection.set_joinstyle>` `.JoinStyle` or {'miter', 'round', 'bevel'} \n :meth:`label <matplotlib.artist.Artist.set_label>` object \n :meth:`linestyle <matplotlib.collections.Collection.set_linestyle>` or dashes or linestyles or ls str or tuple or list thereof \n :meth:`linewidth <matplotlib.collections.Collection.set_linewidth>` or linewidths or lw float or list of floats \n :meth:`norm <matplotlib.cm.ScalarMappable.set_norm>` `.Normalize` or None \n :meth:`offset_transform <matplotlib.collections.Collection.set_offset_transform>` `.Transform` \n :meth:`offsets <matplotlib.collections.Collection.set_offsets>` (N, 2) or (2,) array-like \n :meth:`path_effects <matplotlib.artist.Artist.set_path_effects>` `.AbstractPathEffect` \n :meth:`paths <matplotlib.collections.PolyCollection.set_verts>` list of array-like \n :meth:`picker <matplotlib.artist.Artist.set_picker>` None or bool or float or callable \n :meth:`pickradius <matplotlib.collections.Collection.set_pickradius>` float \n :meth:`rasterized <matplotlib.artist.Artist.set_rasterized>` bool \n :meth:`sizes <matplotlib.collections._CollectionWithSizes.set_sizes>` ndarray or None \n :meth:`sketch_params <matplotlib.artist.Artist.set_sketch_params>` (scale: float, length: float, randomness: float) \n :meth:`snap <matplotlib.artist.Artist.set_snap>` bool or None \n :meth:`transform <matplotlib.artist.Artist.set_transform>` `.Transform` \n :meth:`url <matplotlib.artist.Artist.set_url>` str \n :meth:`urls <matplotlib.collections.Collection.set_urls>` list of str or None \n :meth:`verts <matplotlib.collections.PolyCollection.set_verts>` list of array-like \n :meth:`verts_and_codes <matplotlib.collections.PolyCollection.set_verts_and_codes>` unknown \n :meth:`visible <matplotlib.artist.Artist.set_visible>` bool \n :meth:`zorder <matplotlib.artist.Artist.set_zorder>` float \n ================================================================================================= =====================================================================================================\n\n\nReturns\n-------\n`~matplotlib.quiver.Quiver`\n\nSee Also\n--------\n.Axes.quiverkey : Add a key to a quiver plot.\n"

   remove()[source]

Remove the artist from the figure if possible. The effect will not be visible until the figure is redrawn, e.g., with FigureCanvasBase.draw_idle. Call relim to update the axes limits if desired. Note: relim will not see collections even if the collection was added to the axes with autolim = True. Note: there is no support for removing the artist's legend entry.
   set(*, UVC=<UNSET>, agg_filter=<UNSET>, alpha=<UNSET>, animated=<UNSET>, antialiased=<UNSET>, array=<UNSET>, capstyle=<UNSET>, clim=<UNSET>, clip_box=<UNSET>, clip_on=<UNSET>, clip_path=<UNSET>, cmap=<UNSET>, color=<UNSET>, edgecolor=<UNSET>, facecolor=<UNSET>, gid=<UNSET>, hatch=<UNSET>, in_layout=<UNSET>, joinstyle=<UNSET>, label=<UNSET>, linestyle=<UNSET>, linewidth=<UNSET>, norm=<UNSET>, offset_transform=<UNSET>, offsets=<UNSET>, path_effects=<UNSET>, paths=<UNSET>, picker=<UNSET>, pickradius=<UNSET>, rasterized=<UNSET>, sizes=<UNSET>, sketch_params=<UNSET>, snap=<UNSET>, transform=<UNSET>, url=<UNSET>, urls=<UNSET>, verts=<UNSET>, verts_and_codes=<UNSET>, visible=<UNSET>, zorder=<UNSET>)[source]

Set multiple properties at once. Supported properties are
Property Description
UVC unknown
agg_filter a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array
alpha array-like or scalar or None
animated bool
antialiased or aa or antialiaseds bool or list of bools
array array-like or None
capstyle CapStyle or {'butt', 'projecting', 'round'}
clim (vmin: float, vmax: float)
clip_box Bbox
clip_on bool
clip_path Patch or (Path, Transform) or None
cmap Colormap or str or None
color color or list of rgba tuples
edgecolor or ec or edgecolors color or list of colors or 'face'
facecolor or facecolors or fc color or list of colors
figure Figure
gid str
hatch {'/', '\', '|', '-', '+', 'x', 'o', 'O', '.', '*'}
in_layout bool
joinstyle JoinStyle or {'miter', 'round', 'bevel'}
label object
linestyle or dashes or linestyles or ls str or tuple or list thereof
linewidth or linewidths or lw float or list of floats
norm Normalize or None
offset_transform Transform
offsets (N, 2) or (2,) array-like
path_effects AbstractPathEffect
paths list of array-like
picker None or bool or float or callable
pickradius float
rasterized bool
sizes ndarray or None
sketch_params (scale: float, length: float, randomness: float)
snap bool or None
transform Transform
url str
urls list of str or None
verts list of array-like
verts_and_codes unknown
visible bool
zorder float
   set_UVC(U, V, C=None)[source]

  Examples using matplotlib.quiver.Quiver

   Advanced quiver and quiverkey functions

   Quiver Simple Demo


draw(renderer)[source]

Draw the Artist (and its children) using the given renderer. This has no effect if the artist is not visible (Artist.get_visible returns False).  Parameters

rendererRendererBase subclass.

   Notes This method is overridden in the Artist subclasses.


quiver_doc="\nPlot a 2D field of arrows.\n\nCall signature::\n\n quiver([X, Y], U, V, [C], **kw)\n\n*X*, *Y* define the arrow locations, *U*, *V* define the arrow directions, and\n*C* optionally sets the color.\n\nEach arrow is internally represented by a filled polygon with a default edge\nlinewidth of 0. As a result, an arrow is rather a filled area, not a line with\na head, and `.PolyCollection` properties like *linewidth*, *linestyle*,\n*facecolor*, etc. act accordingly.\n\n**Arrow size**\n\nThe default settings auto-scales the length of the arrows to a reasonable size.\nTo change this behavior see the *scale* and *scale_units* parameters.\n\n**Arrow shape**\n\nThe defaults give a slightly swept-back arrow; to make the head a\ntriangle, make *headaxislength* the same as *headlength*. To make the\narrow more pointed, reduce *headwidth* or increase *headlength* and\n*headaxislength*. To make the head smaller relative to the shaft,\nscale down all the head parameters. You will probably do best to leave\nminshaft alone.\n\n**Arrow outline**\n\n*linewidths* and *edgecolors* can be used to customize the arrow\noutlines.\n\nParameters\n----------\nX, Y : 1D or 2D array-like, optional\n The x and y coordinates of the arrow locations.\n\n If not given, they will be generated as a uniform integer meshgrid based\n on the dimensions of *U* and *V*.\n\n If *X* and *Y* are 1D but *U*, *V* are 2D, *X*, *Y* are expanded to 2D\n using ``X, Y = np.meshgrid(X, Y)``. In this case ``len(X)`` and ``len(Y)``\n must match the column and row dimensions of *U* and *V*.\n\nU, V : 1D or 2D array-like\n The x and y direction components of the arrow vectors.\n\n They must have the same number of elements, matching the number of arrow\n locations. *U* and *V* may be masked. Only locations unmasked in\n *U*, *V*, and *C* will be drawn.\n\nC : 1D or 2D array-like, optional\n Numeric data that defines the arrow colors by colormapping via *norm* and\n *cmap*.\n\n This does not support explicit colors. If you want to set colors directly,\n use *color* instead. The size of *C* must match the number of arrow\n locations.\n\nunits : {'width', 'height', 'dots', 'inches', 'x', 'y', 'xy'}, default: 'width'\n The arrow dimensions (except for *length*) are measured in multiples of\n this unit.\n\n The following values are supported:\n\n - 'width', 'height': The width or height of the axis.\n - 'dots', 'inches': Pixels or inches based on the figure dpi.\n - 'x', 'y', 'xy': *X*, *Y* or :math:`\\sqrt{X^2 + Y^2}` in data units.\n\n The arrows scale differently depending on the units. For\n 'x' or 'y', the arrows get larger as one zooms in; for other\n units, the arrow size is independent of the zoom state. For\n 'width or 'height', the arrow size increases with the width and\n height of the axes, respectively, when the window is resized;\n for 'dots' or 'inches', resizing does not change the arrows.\n\nangles : {'uv', 'xy'} or array-like, default: 'uv'\n Method for determining the angle of the arrows.\n\n - 'uv': The arrow axis aspect ratio is 1 so that\n if *U* == *V* the orientation of the arrow on the plot is 45 degrees\n counter-clockwise from the horizontal axis (positive to the right).\n\n Use this if the arrows symbolize a quantity that is not based on\n *X*, *Y* data coordinates.\n\n - 'xy': Arrows point from (x, y) to (x+u, y+v).\n Use this for plotting a gradient field, for example.\n\n - Alternatively, arbitrary angles may be specified explicitly as an array\n of values in degrees, counter-clockwise from the horizontal axis.\n\n In this case *U*, *V* is only used to determine the length of the\n arrows.\n\n Note: inverting a data axis will correspondingly invert the\n arrows only with ``angles='xy'``.\n\nscale : float, optional\n Number of data units per arrow length unit, e.g., m/s per plot width; a\n smaller scale parameter makes the arrow longer. Default is *None*.\n\n If *None*, a simple autoscaling algorithm is used, based on the average\n vector length and the number of vectors. The arrow length unit is given by\n the *scale_units* parameter.\n\nscale_units : {'width', 'height', 'dots', 'inches', 'x', 'y', 'xy'}, optional\n If the *scale* kwarg is *None*, the arrow length unit. Default is *None*.\n\n e.g. *scale_units* is 'inches', *scale* is 2.0, and ``(u, v) = (1, 0)``,\n then the vector will be 0.5 inches long.\n\n If *scale_units* is 'width' or 'height', then the vector will be half the\n width/height of the axes.\n\n If *scale_units* is 'x' then the vector will be 0.5 x-axis\n units. To plot vectors in the x-y plane, with u and v having\n the same units as x and y, use\n ``angles='xy', scale_units='xy', scale=1``.\n\nwidth : float, optional\n Shaft width in arrow units; default depends on choice of units,\n above, and number of vectors; a typical starting value is about\n 0.005 times the width of the plot.\n\nheadwidth : float, default: 3\n Head width as multiple of shaft width.\n\nheadlength : float, default: 5\n Head length as multiple of shaft width.\n\nheadaxislength : float, default: 4.5\n Head length at shaft intersection.\n\nminshaft : float, default: 1\n Length below which arrow scales, in units of head length. Do not\n set this to less than 1, or small arrows will look terrible!\n\nminlength : float, default: 1\n Minimum length as a multiple of shaft width; if an arrow length\n is less than this, plot a dot (hexagon) of this diameter instead.\n\npivot : {'tail', 'mid', 'middle', 'tip'}, default: 'tail'\n The part of the arrow that is anchored to the *X*, *Y* grid. The arrow\n rotates about this point.\n\n 'mid' is a synonym for 'middle'.\n\ncolor : color or color sequence, optional\n Explicit color(s) for the arrows. If *C* has been set, *color* has no\n effect.\n\n This is a synonym for the `.PolyCollection` *facecolor* parameter.\n\nOther Parameters\n----------------\ndata : indexable object, optional\n DATA_PARAMETER_PLACEHOLDER\n\n**kwargs : `~matplotlib.collections.PolyCollection` properties, optional\n All other keyword arguments are passed on to `.PolyCollection`:\n\n \n .. table::\n :class: property-table\n\n ================================================================================================= =====================================================================================================\n Property Description \n ================================================================================================= =====================================================================================================\n :meth:`agg_filter <matplotlib.artist.Artist.set_agg_filter>` a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array\n :meth:`alpha <matplotlib.collections.Collection.set_alpha>` array-like or scalar or None \n :meth:`animated <matplotlib.artist.Artist.set_animated>` bool \n :meth:`antialiased <matplotlib.collections.Collection.set_antialiased>` or aa or antialiaseds bool or list of bools \n :meth:`array <matplotlib.cm.ScalarMappable.set_array>` array-like or None \n :meth:`capstyle <matplotlib.collections.Collection.set_capstyle>` `.CapStyle` or {'butt', 'projecting', 'round'} \n :meth:`clim <matplotlib.cm.ScalarMappable.set_clim>` (vmin: float, vmax: float) \n :meth:`clip_box <matplotlib.artist.Artist.set_clip_box>` `.Bbox` \n :meth:`clip_on <matplotlib.artist.Artist.set_clip_on>` bool \n :meth:`clip_path <matplotlib.artist.Artist.set_clip_path>` Patch or (Path, Transform) or None \n :meth:`cmap <matplotlib.cm.ScalarMappable.set_cmap>` `.Colormap` or str or None \n :meth:`color <matplotlib.collections.Collection.set_color>` color or list of rgba tuples \n :meth:`edgecolor <matplotlib.collections.Collection.set_edgecolor>` or ec or edgecolors color or list of colors or 'face' \n :meth:`facecolor <matplotlib.collections.Collection.set_facecolor>` or facecolors or fc color or list of colors \n :meth:`figure <matplotlib.artist.Artist.set_figure>` `.Figure` \n :meth:`gid <matplotlib.artist.Artist.set_gid>` str \n :meth:`hatch <matplotlib.collections.Collection.set_hatch>` {'/', '\\\\', '|', '-', '+', 'x', 'o', 'O', '.', '*'} \n :meth:`in_layout <matplotlib.artist.Artist.set_in_layout>` bool \n :meth:`joinstyle <matplotlib.collections.Collection.set_joinstyle>` `.JoinStyle` or {'miter', 'round', 'bevel'} \n :meth:`label <matplotlib.artist.Artist.set_label>` object \n :meth:`linestyle <matplotlib.collections.Collection.set_linestyle>` or dashes or linestyles or ls str or tuple or list thereof \n :meth:`linewidth <matplotlib.collections.Collection.set_linewidth>` or linewidths or lw float or list of floats \n :meth:`norm <matplotlib.cm.ScalarMappable.set_norm>` `.Normalize` or None \n :meth:`offset_transform <matplotlib.collections.Collection.set_offset_transform>` `.Transform` \n :meth:`offsets <matplotlib.collections.Collection.set_offsets>` (N, 2) or (2,) array-like \n :meth:`path_effects <matplotlib.artist.Artist.set_path_effects>` `.AbstractPathEffect` \n :meth:`paths <matplotlib.collections.PolyCollection.set_verts>` list of array-like \n :meth:`picker <matplotlib.artist.Artist.set_picker>` None or bool or float or callable \n :meth:`pickradius <matplotlib.collections.Collection.set_pickradius>` float \n :meth:`rasterized <matplotlib.artist.Artist.set_rasterized>` bool \n :meth:`sizes <matplotlib.collections._CollectionWithSizes.set_sizes>` ndarray or None \n :meth:`sketch_params <matplotlib.artist.Artist.set_sketch_params>` (scale: float, length: float, randomness: float) \n :meth:`snap <matplotlib.artist.Artist.set_snap>` bool or None \n :meth:`transform <matplotlib.artist.Artist.set_transform>` `.Transform` \n :meth:`url <matplotlib.artist.Artist.set_url>` str \n :meth:`urls <matplotlib.collections.Collection.set_urls>` list of str or None \n :meth:`verts <matplotlib.collections.PolyCollection.set_verts>` list of array-like \n :meth:`verts_and_codes <matplotlib.collections.PolyCollection.set_verts_and_codes>` unknown \n :meth:`visible <matplotlib.artist.Artist.set_visible>` bool \n :meth:`zorder <matplotlib.artist.Artist.set_zorder>` float \n ================================================================================================= =====================================================================================================\n\n\nReturns\n-------\n`~matplotlib.quiver.Quiver`\n\nSee Also\n--------\n.Axes.quiverkey : Add a key to a quiver plot.\n"


remove()[source]

Remove the artist from the figure if possible. The effect will not be visible until the figure is redrawn, e.g., with FigureCanvasBase.draw_idle. Call relim to update the axes limits if desired. Note: relim will not see collections even if the collection was added to the axes with autolim = True. Note: there is no support for removing the artist's legend entry.


set(*, UVC=<UNSET>, agg_filter=<UNSET>, alpha=<UNSET>, animated=<UNSET>, antialiased=<UNSET>, array=<UNSET>, capstyle=<UNSET>, clim=<UNSET>, clip_box=<UNSET>, clip_on=<UNSET>, clip_path=<UNSET>, cmap=<UNSET>, color=<UNSET>, edgecolor=<UNSET>, facecolor=<UNSET>, gid=<UNSET>, hatch=<UNSET>, in_layout=<UNSET>, joinstyle=<UNSET>, label=<UNSET>, linestyle=<UNSET>, linewidth=<UNSET>, norm=<UNSET>, offset_transform=<UNSET>, offsets=<UNSET>, path_effects=<UNSET>, paths=<UNSET>, picker=<UNSET>, pickradius=<UNSET>, rasterized=<UNSET>, sizes=<UNSET>, sketch_params=<UNSET>, snap=<UNSET>, transform=<UNSET>, url=<UNSET>, urls=<UNSET>, verts=<UNSET>, verts_and_codes=<UNSET>, visible=<UNSET>, zorder=<UNSET>)[source]

Set multiple properties at once. Supported properties are
Property Description
UVC unknown
agg_filter a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array
alpha array-like or scalar or None
animated bool
antialiased or aa or antialiaseds bool or list of bools
array array-like or None
capstyle CapStyle or {'butt', 'projecting', 'round'}
clim (vmin: float, vmax: float)
clip_box Bbox
clip_on bool
clip_path Patch or (Path, Transform) or None
cmap Colormap or str or None
color color or list of rgba tuples
edgecolor or ec or edgecolors color or list of colors or 'face'
facecolor or facecolors or fc color or list of colors
figure Figure
gid str
hatch {'/', '\', '|', '-', '+', 'x', 'o', 'O', '.', '*'}
in_layout bool
joinstyle JoinStyle or {'miter', 'round', 'bevel'}
label object
linestyle or dashes or linestyles or ls str or tuple or list thereof
linewidth or linewidths or lw float or list of floats
norm Normalize or None
offset_transform Transform
offsets (N, 2) or (2,) array-like
path_effects AbstractPathEffect
paths list of array-like
picker None or bool or float or callable
pickradius float
rasterized bool
sizes ndarray or None
sketch_params (scale: float, length: float, randomness: float)
snap bool or None
transform Transform
url str
urls list of str or None
verts list of array-like
verts_and_codes unknown
visible bool
zorder float


matplotlib.quiver.QuiverKey   classmatplotlib.quiver.QuiverKey(Q, X, Y, U, label, *, angle=0, coordinates='axes', color=None, labelsep=0.1, labelpos='N', labelcolor=None, fontproperties=None, **kw)[source]

Bases: matplotlib.artist.Artist Labelled arrow for use as a quiver plot scale key. Add a key to a quiver plot. The positioning of the key depends on X, Y, coordinates, and labelpos. If labelpos is 'N' or 'S', X, Y give the position of the middle of the key arrow. If labelpos is 'E', X, Y positions the head, and if labelpos is 'W', X, Y positions the tail; in either of these two cases, X, Y is somewhere in the middle of the arrow+label key object.  Parameters

Qmatplotlib.quiver.Quiver

A Quiver object as returned by a call to 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 the x-axis.
coordinates{'axes', 'figure', 'data', 'inches'}, default: 'axes'

Coordinate system and units for X, Y: 'axes' and 'figure' are normalized 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 the lower left corner.
colorcolor

Overrides face and edge colors from Q.
labelpos{'N', 'S', 'E', 'W'}

Position the label above, below, to the right, to the left of the arrow, 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.  **kwargs

Any additional keyword arguments are used to override vector properties taken from Q.       contains(mouseevent)[source]

Test whether the artist contains the mouse event.  Parameters

mouseeventmatplotlib.backend_bases.MouseEvent

  Returns

containsbool

Whether any values are within the radius.
detailsdict

An artist-specific dictionary of details of the event context, such as which points are contained in the pick radius. See the individual Artist subclasses for details.
   draw(renderer)[source]

Draw the Artist (and its children) using the given renderer. This has no effect if the artist is not visible (Artist.get_visible returns False).  Parameters

rendererRendererBase subclass.

   Notes This method is overridden in the Artist subclasses.
   halign={'E': 'left', 'N': 'center', 'S': 'center', 'W': 'right'}

   pivot={'E': 'tip', 'N': 'middle', 'S': 'middle', 'W': 'tail'}

   remove()[source]

Remove the artist from the figure if possible. The effect will not be visible until the figure is redrawn, e.g., with FigureCanvasBase.draw_idle. Call relim to update the axes limits if desired. Note: relim will not see collections even if the collection was added to the axes with autolim = True. Note: there is no support for removing the artist's legend entry.
   set(*, agg_filter=<UNSET>, alpha=<UNSET>, animated=<UNSET>, clip_box=<UNSET>, clip_on=<UNSET>, clip_path=<UNSET>, gid=<UNSET>, in_layout=<UNSET>, label=<UNSET>, path_effects=<UNSET>, picker=<UNSET>, rasterized=<UNSET>, sketch_params=<UNSET>, snap=<UNSET>, transform=<UNSET>, url=<UNSET>, visible=<UNSET>, zorder=<UNSET>)[source]

Set multiple properties at once. Supported properties are
Property Description
agg_filter a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array
alpha scalar or None
animated bool
clip_box Bbox
clip_on bool
clip_path Patch or (Path, Transform) or None
figure unknown
gid str
in_layout bool
label object
path_effects AbstractPathEffect
picker None or bool or float or callable
rasterized bool
sketch_params (scale: float, length: float, randomness: float)
snap bool or None
transform Transform
url str
visible bool
zorder float
   set_figure(fig)[source]

Set the Figure instance the artist belongs to.  Parameters

figFigure

   valign={'E': 'center', 'N': 'bottom', 'S': 'top', 'W': 'center'}

  Examples using matplotlib.quiver.QuiverKey

   Advanced quiver and quiverkey functions


contains(mouseevent)[source]

Test whether the artist contains the mouse event.  Parameters

mouseeventmatplotlib.backend_bases.MouseEvent

  Returns

containsbool

Whether any values are within the radius.
detailsdict

An artist-specific dictionary of details of the event context, such as which points are contained in the pick radius. See the individual Artist subclasses for details.


halign={'E': 'left', 'N': 'center', 'S': 'center', 'W': 'right'}


pivot={'E': 'tip', 'N': 'middle', 'S': 'middle', 'W': 'tail'}


set(*, agg_filter=<UNSET>, alpha=<UNSET>, animated=<UNSET>, clip_box=<UNSET>, clip_on=<UNSET>, clip_path=<UNSET>, gid=<UNSET>, in_layout=<UNSET>, label=<UNSET>, path_effects=<UNSET>, picker=<UNSET>, rasterized=<UNSET>, sketch_params=<UNSET>, snap=<UNSET>, transform=<UNSET>, url=<UNSET>, visible=<UNSET>, zorder=<UNSET>)[source]

Set multiple properties at once. Supported properties are
Property Description
agg_filter a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array
alpha scalar or None
animated bool
clip_box Bbox
clip_on bool
clip_path Patch or (Path, Transform) or None
figure unknown
gid str
in_layout bool
label object
path_effects AbstractPathEffect
picker None or bool or float or callable
rasterized bool
sketch_params (scale: float, length: float, randomness: float)
snap bool or None
transform Transform
url str
visible bool
zorder float


set_figure(fig)[source]

Set the Figure instance the artist belongs to.  Parameters

figFigure


valign={'E': 'center', 'N': 'bottom', 'S': 'top', 'W': 'center'}


matplotlib.rc(group, **kwargs)[source]

Set the current rcParams. group is the grouping for the rc, e.g., for lines.linewidth the group is lines, for axes.facecolor, the group is axes, and so on. Group may also be a list or tuple of group names, e.g., (xtick, ytick). kwargs is a dictionary attribute name/value pairs, e.g.,: rc('lines', linewidth=2, color='r')
 sets the current rcParams and is equivalent to: rcParams['lines.linewidth'] = 2
rcParams['lines.color'] = 'r'
 The following aliases are available to save typing for interactive users:
Alias Property
'lw' 'linewidth'
'ls' 'linestyle'
'c' 'color'
'fc' 'facecolor'
'ec' 'edgecolor'
'mew' 'markeredgewidth'
'aa' 'antialiased'   Thus you could abbreviate the above call as: rc('lines', lw=2, c='r')
 Note you can use python's kwargs dictionary facility to store dictionaries of default parameters. e.g., you can customize the font rc as follows: font = {'family' : 'monospace',
        'weight' : 'bold',
        'size'   : 'larger'}
rc('font', **font)  # pass in the font dict as kwargs
 This enables you to easily switch between several configurations. Use matplotlib.style.use('default') or rcdefaults() to restore the default rcParams after changes. Notes Similar functionality is available by using the normal dict interface, i.e. rcParams.update({"lines.linewidth": 2, ...}) (but rcParams.update does not support abbreviations or grouping).


matplotlib.rc_context(rc=None, fname=None)

Return a context manager for temporarily changing rcParams.  Parameters

rcdict

The rcParams to temporarily set.
fnamestr or path-like

A file with Matplotlib rc settings. If both fname and rc are given, settings from rc take precedence.      See also  The matplotlibrc file
  Examples Passing explicit values via a dict: with mpl.rc_context({'interactive': False}):
    fig, ax = plt.subplots()
    ax.plot(range(3), range(3))
    fig.savefig('example.png')
    plt.close(fig)
 Loading settings from a file: with mpl.rc_context(fname='print.rc'):
    plt.plot(x, y)  # uses 'print.rc'


matplotlib.rc_file(fname, *, use_default_template=True)[source]

Update rcParams from file. Style-blacklisted rcParams (defined in matplotlib.style.core.STYLE_BLACKLIST) are not updated.  Parameters

fnamestr or path-like

A file with Matplotlib rc settings.
use_default_templatebool

If True, initialize with default parameters before updating with those in the given file. If False, the current configuration persists and only the parameters specified in the file are updated.


matplotlib.rc_file_defaults()[source]

Restore the rcParams from the original rc file loaded by Matplotlib. Style-blacklisted rcParams (defined in matplotlib.style.core.STYLE_BLACKLIST) are not updated.


matplotlib.rc_params(fail_on_error=False)[source]

Construct a RcParams instance from the default Matplotlib rc file.


matplotlib.rc_params_from_file(fname, fail_on_error=False, use_default_template=True)[source]

Construct a RcParams from file fname.  Parameters

fnamestr or path-like

A file with Matplotlib rc settings.
fail_on_errorbool

If True, raise an error when the parser fails to convert a parameter.
use_default_templatebool

If True, initialize with default parameters before updating with those in the given file. If False, the configuration class only contains the parameters specified in the file. (Useful for updating dicts.)


matplotlib.rcdefaults()[source]

Restore the rcParams from Matplotlib's internal default style. Style-blacklisted rcParams (defined in matplotlib.style.core.STYLE_BLACKLIST) are not updated.  See also  matplotlib.rc_file_defaults

Restore the rcParams from the rc file originally loaded by Matplotlib.  matplotlib.style.use

Use a specific style file. Call style.use('default') to restore the default style.


matplotlib.rcParams[source]

An instance of RcParams for handling default Matplotlib values.