classmatplotlib.RcParams(*args, **kwargs)[source]

A dictionary object including validation. Validating functions are defined and associated with rc parameters in matplotlib.rcsetup. The list of rcParams is:  _internal.classic_mode agg.path.chunksize animation.bitrate animation.codec animation.convert_args animation.convert_path animation.embed_limit animation.ffmpeg_args animation.ffmpeg_path animation.frame_format animation.html animation.writer axes.autolimit_mode axes.axisbelow axes.edgecolor axes.facecolor axes.formatter.limits axes.formatter.min_exponent axes.formatter.offset_threshold axes.formatter.use_locale axes.formatter.use_mathtext axes.formatter.useoffset axes.grid axes.grid.axis axes.grid.which axes.labelcolor axes.labelpad axes.labelsize axes.labelweight axes.linewidth axes.prop_cycle axes.spines.bottom axes.spines.left axes.spines.right axes.spines.top axes.titlecolor axes.titlelocation axes.titlepad axes.titlesize axes.titleweight axes.titley axes.unicode_minus axes.xmargin axes.ymargin axes.zmargin axes3d.grid backend backend_fallback boxplot.bootstrap boxplot.boxprops.color boxplot.boxprops.linestyle boxplot.boxprops.linewidth boxplot.capprops.color boxplot.capprops.linestyle boxplot.capprops.linewidth boxplot.flierprops.color boxplot.flierprops.linestyle boxplot.flierprops.linewidth boxplot.flierprops.marker boxplot.flierprops.markeredgecolor boxplot.flierprops.markeredgewidth boxplot.flierprops.markerfacecolor boxplot.flierprops.markersize boxplot.meanline boxplot.meanprops.color boxplot.meanprops.linestyle boxplot.meanprops.linewidth boxplot.meanprops.marker boxplot.meanprops.markeredgecolor boxplot.meanprops.markerfacecolor boxplot.meanprops.markersize boxplot.medianprops.color boxplot.medianprops.linestyle boxplot.medianprops.linewidth boxplot.notch boxplot.patchartist boxplot.showbox boxplot.showcaps boxplot.showfliers boxplot.showmeans boxplot.vertical boxplot.whiskerprops.color boxplot.whiskerprops.linestyle boxplot.whiskerprops.linewidth boxplot.whiskers contour.corner_mask contour.linewidth contour.negative_linestyle date.autoformatter.day date.autoformatter.hour date.autoformatter.microsecond date.autoformatter.minute date.autoformatter.month date.autoformatter.second date.autoformatter.year date.converter date.epoch date.interval_multiples docstring.hardcopy errorbar.capsize figure.autolayout figure.constrained_layout.h_pad figure.constrained_layout.hspace figure.constrained_layout.use figure.constrained_layout.w_pad figure.constrained_layout.wspace figure.dpi figure.edgecolor figure.facecolor figure.figsize figure.frameon figure.max_open_warning figure.raise_window figure.subplot.bottom figure.subplot.hspace figure.subplot.left figure.subplot.right figure.subplot.top figure.subplot.wspace figure.titlesize figure.titleweight font.cursive font.family font.fantasy font.monospace font.sans-serif font.serif font.size font.stretch font.style font.variant font.weight grid.alpha grid.color grid.linestyle grid.linewidth hatch.color hatch.linewidth hist.bins image.aspect image.cmap image.composite_image image.interpolation image.lut image.origin image.resample interactive keymap.back keymap.copy keymap.forward keymap.fullscreen keymap.grid keymap.grid_minor keymap.help keymap.home keymap.pan keymap.quit keymap.quit_all keymap.save keymap.xscale keymap.yscale keymap.zoom legend.borderaxespad legend.borderpad legend.columnspacing legend.edgecolor legend.facecolor legend.fancybox legend.fontsize legend.framealpha legend.frameon legend.handleheight legend.handlelength legend.handletextpad legend.labelcolor legend.labelspacing legend.loc legend.markerscale legend.numpoints legend.scatterpoints legend.shadow legend.title_fontsize lines.antialiased lines.color lines.dash_capstyle lines.dash_joinstyle lines.dashdot_pattern lines.dashed_pattern lines.dotted_pattern lines.linestyle lines.linewidth lines.marker lines.markeredgecolor lines.markeredgewidth lines.markerfacecolor lines.markersize lines.scale_dashes lines.solid_capstyle lines.solid_joinstyle markers.fillstyle mathtext.bf mathtext.cal mathtext.default mathtext.fallback mathtext.fontset mathtext.it mathtext.rm mathtext.sf mathtext.tt patch.antialiased patch.edgecolor patch.facecolor patch.force_edgecolor patch.linewidth path.effects path.simplify path.simplify_threshold path.sketch path.snap pcolor.shading pcolormesh.snap pdf.compression pdf.fonttype pdf.inheritcolor pdf.use14corefonts pgf.preamble pgf.rcfonts pgf.texsystem polaraxes.grid ps.distiller.res ps.fonttype ps.papersize ps.useafm ps.usedistiller savefig.bbox savefig.directory savefig.dpi savefig.edgecolor savefig.facecolor savefig.format savefig.orientation savefig.pad_inches savefig.transparent scatter.edgecolors scatter.marker svg.fonttype svg.hashsalt svg.image_inline text.antialiased text.color text.hinting text.hinting_factor text.kerning_factor text.latex.preamble text.usetex timezone tk.window_focus toolbar webagg.address webagg.open_in_browser webagg.port webagg.port_retries xaxis.labellocation xtick.alignment xtick.bottom xtick.color xtick.direction xtick.labelbottom xtick.labelcolor xtick.labelsize xtick.labeltop xtick.major.bottom xtick.major.pad xtick.major.size xtick.major.top xtick.major.width xtick.minor.bottom xtick.minor.pad xtick.minor.size xtick.minor.top xtick.minor.visible xtick.minor.width xtick.top yaxis.labellocation ytick.alignment ytick.color ytick.direction ytick.labelcolor ytick.labelleft ytick.labelright ytick.labelsize ytick.left ytick.major.left ytick.major.pad ytick.major.right ytick.major.size ytick.major.width ytick.minor.left ytick.minor.pad ytick.minor.right ytick.minor.size ytick.minor.visible ytick.minor.width ytick.right   See also  The matplotlibrc file
    find_all(pattern)[source]

Return the subset of this RcParams dictionary whose keys match, using re.search(), the given pattern.  Note Changes to the returned dictionary are not propagated to the parent RcParams dictionary.


find_all(pattern)[source]

Return the subset of this RcParams dictionary whose keys match, using re.search(), the given pattern.  Note Changes to the returned dictionary are not propagated to the parent RcParams dictionary.


matplotlib.rcsetup The rcsetup module contains the validation code for customization using Matplotlib's rc settings. Each rc setting is assigned a function used to validate any attempted changes to that setting. The validation functions are defined in the rcsetup module, and are used to construct the rcParams global object which stores the settings and is referenced throughout Matplotlib. The default values of the rc settings are set in the default matplotlibrc file. Any additions or deletions to the parameter set listed here should also be propagated to the matplotlibrc.template in Matplotlib's root source directory.   classmatplotlib.rcsetup.ValidateInStrings(key, valid, ignorecase=False, *, _deprecated_since=None)[source]

Bases: object valid is a list of legal strings.
   matplotlib.rcsetup.cycler(*args, **kwargs)[source]

Create a Cycler object much like cycler.cycler(), but includes input validation. Call signatures: cycler(cycler)
cycler(label=values[, label2=values2[, ...]])
cycler(label, values)
 Form 1 copies a given Cycler object. Form 2 creates a Cycler which cycles over one or more properties simultaneously. If multiple properties are given, their value lists must have the same length. Form 3 creates a Cycler for a single property. This form exists for compatibility with the original cycler. Its use is discouraged in favor of the kwarg form, i.e. cycler(label=values).  Parameters

cyclerCycler

Copy constructor for Cycler.
labelstr

The property key. Must be a valid Artist property. For example, 'color' or 'linestyle'. Aliases are allowed, such as 'c' for 'color' and 'lw' for 'linewidth'.
valuesiterable

Finite-length iterable of the property values. These values are validated and will raise a ValueError if invalid.    Returns
 Cycler

A new Cycler for the given properties.     Examples Creating a cycler for a single property: >>> c = cycler(color=['red', 'green', 'blue'])
 Creating a cycler for simultaneously cycling over multiple properties (e.g. red circle, green plus, blue cross): >>> c = cycler(color=['red', 'green', 'blue'],
...            marker=['o', '+', 'x'])

   matplotlib.rcsetup.validate_any(s)[source]

   matplotlib.rcsetup.validate_anylist(s)[source]

   matplotlib.rcsetup.validate_aspect(s)[source]

   matplotlib.rcsetup.validate_axisbelow(s)[source]

   matplotlib.rcsetup.validate_backend(s)[source]

   matplotlib.rcsetup.validate_bbox(s)[source]

   matplotlib.rcsetup.validate_bool(b)[source]

Convert b to bool or raise.
   matplotlib.rcsetup.validate_color(s)[source]

Return a valid color arg.
   matplotlib.rcsetup.validate_color_for_prop_cycle(s)[source]

   matplotlib.rcsetup.validate_color_or_auto(s)[source]

   matplotlib.rcsetup.validate_color_or_inherit(s)[source]

Return a valid color arg.
   matplotlib.rcsetup.validate_colorlist(s)[source]

return a list of colorspecs
   matplotlib.rcsetup.validate_cycler(s)[source]

Return a Cycler object from a string repr or the object itself.
   matplotlib.rcsetup.validate_dashlist(s)[source]

return a list of floats
   matplotlib.rcsetup.validate_dpi(s)[source]

Confirm s is string 'figure' or convert s to float or raise.
   matplotlib.rcsetup.validate_fillstylelist(s)[source]

   matplotlib.rcsetup.validate_float(s)[source]

   matplotlib.rcsetup.validate_float_or_None(s)[source]

   matplotlib.rcsetup.validate_floatlist(s)[source]

return a list of floats
   matplotlib.rcsetup.validate_font_properties(s)[source]

   matplotlib.rcsetup.validate_fontsize(s)[source]

   matplotlib.rcsetup.validate_fontsize_None(s)[source]

   matplotlib.rcsetup.validate_fontsizelist(s)[source]

   matplotlib.rcsetup.validate_fonttype(s)[source]

Confirm that this is a Postscript or PDF font type that we know how to convert to.
   matplotlib.rcsetup.validate_fontweight(s)[source]

   matplotlib.rcsetup.validate_hatch(s)[source]

Validate a hatch pattern. A hatch pattern string can have any sequence of the following characters: \ / | - + * . x o O.
   matplotlib.rcsetup.validate_hatchlist(s)[source]

Validate a hatch pattern. A hatch pattern string can have any sequence of the following characters: \ / | - + * . x o O.
   matplotlib.rcsetup.validate_hist_bins(s)[source]

   matplotlib.rcsetup.validate_int(s)[source]

   matplotlib.rcsetup.validate_int_or_None(s)[source]

   matplotlib.rcsetup.validate_markevery(s)[source]

Validate the markevery property of a Line2D object.  Parameters

sNone, int, (int, int), slice, float, (float, float), or list[int]

  Returns
 None, int, (int, int), slice, float, (float, float), or list[int]

   matplotlib.rcsetup.validate_markeverylist(s)[source]

Validate the markevery property of a Line2D object.  Parameters

sNone, int, (int, int), slice, float, (float, float), or list[int]

  Returns
 None, int, (int, int), slice, float, (float, float), or list[int]

   matplotlib.rcsetup.validate_ps_distiller(s)[source]

   matplotlib.rcsetup.validate_sketch(s)[source]

   matplotlib.rcsetup.validate_string(s)[source]

   matplotlib.rcsetup.validate_string_or_None(s)[source]

   matplotlib.rcsetup.validate_stringlist(s)[source]

return a list of strings
   matplotlib.rcsetup.validate_whiskers(s)[source]


matplotlib.rcsetup.cycler(*args, **kwargs)[source]

Create a Cycler object much like cycler.cycler(), but includes input validation. Call signatures: cycler(cycler)
cycler(label=values[, label2=values2[, ...]])
cycler(label, values)
 Form 1 copies a given Cycler object. Form 2 creates a Cycler which cycles over one or more properties simultaneously. If multiple properties are given, their value lists must have the same length. Form 3 creates a Cycler for a single property. This form exists for compatibility with the original cycler. Its use is discouraged in favor of the kwarg form, i.e. cycler(label=values).  Parameters

cyclerCycler

Copy constructor for Cycler.
labelstr

The property key. Must be a valid Artist property. For example, 'color' or 'linestyle'. Aliases are allowed, such as 'c' for 'color' and 'lw' for 'linewidth'.
valuesiterable

Finite-length iterable of the property values. These values are validated and will raise a ValueError if invalid.    Returns
 Cycler

A new Cycler for the given properties.     Examples Creating a cycler for a single property: >>> c = cycler(color=['red', 'green', 'blue'])
 Creating a cycler for simultaneously cycling over multiple properties (e.g. red circle, green plus, blue cross): >>> c = cycler(color=['red', 'green', 'blue'],
...            marker=['o', '+', 'x'])


matplotlib.rcsetup.validate_bool(b)[source]

Convert b to bool or raise.


matplotlib.rcsetup.validate_color(s)[source]

Return a valid color arg.


matplotlib.rcsetup.validate_color_or_inherit(s)[source]

Return a valid color arg.


matplotlib.rcsetup.validate_colorlist(s)[source]

return a list of colorspecs


matplotlib.rcsetup.validate_cycler(s)[source]

Return a Cycler object from a string repr or the object itself.


matplotlib.rcsetup.validate_dashlist(s)[source]

return a list of floats


matplotlib.rcsetup.validate_dpi(s)[source]

Confirm s is string 'figure' or convert s to float or raise.


matplotlib.rcsetup.validate_floatlist(s)[source]

return a list of floats


matplotlib.rcsetup.validate_fonttype(s)[source]

Confirm that this is a Postscript or PDF font type that we know how to convert to.


matplotlib.rcsetup.validate_hatch(s)[source]

Validate a hatch pattern. A hatch pattern string can have any sequence of the following characters: \ / | - + * . x o O.


matplotlib.rcsetup.validate_hatchlist(s)[source]

Validate a hatch pattern. A hatch pattern string can have any sequence of the following characters: \ / | - + * . x o O.


matplotlib.rcsetup.validate_markevery(s)[source]

Validate the markevery property of a Line2D object.  Parameters

sNone, int, (int, int), slice, float, (float, float), or list[int]

  Returns
 None, int, (int, int), slice, float, (float, float), or list[int]


matplotlib.rcsetup.validate_markeverylist(s)[source]

Validate the markevery property of a Line2D object.  Parameters

sNone, int, (int, int), slice, float, (float, float), or list[int]

  Returns
 None, int, (int, int), slice, float, (float, float), or list[int]


matplotlib.rcsetup.validate_stringlist(s)[source]

return a list of strings


classmatplotlib.rcsetup.ValidateInStrings(key, valid, ignorecase=False, *, _deprecated_since=None)[source]

Bases: object valid is a list of legal strings.


matplotlib.sankey Module for creating Sankey diagrams using Matplotlib.   classmatplotlib.sankey.Sankey(ax=None, scale=1.0, unit='', format='%G', gap=0.25, radius=0.1, shoulder=0.03, offset=0.15, head_angle=100, margin=0.4, tolerance=1e-06, **kwargs)[source]

Bases: object Sankey diagram. Sankey diagrams are a specific type of flow diagram, in which the width of the arrows is shown proportionally to the flow quantity. They are typically used to visualize energy or material or cost transfers between processes. Wikipedia (6/1/2011) Create a new Sankey instance. The optional arguments listed below are applied to all subdiagrams so that there is consistent alignment and formatting. In order to draw a complex Sankey diagram, create an instance of Sankey by calling it without any kwargs: sankey = Sankey()
 Then add simple Sankey sub-diagrams: sankey.add() # 1
sankey.add() # 2
#...
sankey.add() # n
 Finally, create the full diagram: sankey.finish()
 Or, instead, simply daisy-chain those calls: Sankey().add().add...  .add().finish()
  Other Parameters

axAxes

Axes onto which the data should be plotted. If ax isn't provided, new Axes will be created.
scalefloat

Scaling factor for the flows. scale sizes the width of the paths in order to maintain proper layout. The same scale is applied to all subdiagrams. The value should be chosen such that the product of the scale and the sum of the inputs is approximately 1.0 (and the product of the scale and the sum of the outputs is approximately -1.0).
unitstr

The physical unit associated with the flow quantities. If unit is None, then none of the quantities are labeled.
formatstr or callable

A Python number formatting string or callable used to label the flows with their quantities (i.e., a number times a unit, where the unit is given). If a format string is given, the label will be format % quantity. If a callable is given, it will be called with quantity as an argument.
gapfloat

Space between paths that break in/break away to/from the top or bottom.
radiusfloat

Inner radius of the vertical paths.
shoulderfloat

Size of the shoulders of output arrows.
offsetfloat

Text offset (from the dip or tip of the arrow).
head_anglefloat

Angle, in degrees, of the arrow heads (and negative of the angle of the tails).
marginfloat

Minimum space between Sankey outlines and the edge of the plot area.
tolerancefloat

Acceptable maximum of the magnitude of the sum of flows. The magnitude of the sum of connected flows cannot be greater than tolerance.  **kwargs

Any additional keyword arguments will be passed to add(), which will create the first subdiagram.      See also  Sankey.add
Sankey.finish
  Examples (Source code)    (png, pdf)      (png, pdf)      (png, pdf)     add(patchlabel='', flows=None, orientations=None, labels='', trunklength=1.0, pathlengths=0.25, prior=None, connect=(0, 0), rotation=0, **kwargs)[source]

Add a simple Sankey diagram with flows at the same hierarchical level.  Parameters

patchlabelstr

Label to be placed at the center of the diagram. Note that label (not patchlabel) can be passed as keyword argument to create an entry in the legend.
flowslist of float

Array of flow values. By convention, inputs are positive and outputs are negative. Flows are placed along the top of the diagram from the inside out in order of their index within flows. They are placed along the sides of the diagram from the top down and along the bottom from the outside in. If the sum of the inputs and outputs is nonzero, the discrepancy will appear as a cubic Bezier curve along the top and bottom edges of the trunk.
orientationslist of {-1, 0, 1}

List of orientations of the flows (or a single orientation to be used for all flows). Valid values are 0 (inputs from the left, outputs to the right), 1 (from and to the top) or -1 (from and to the bottom).
labelslist of (str or None)

List of labels for the flows (or a single label to be used for all flows). Each label may be None (no label), or a labeling string. If an entry is a (possibly empty) string, then the quantity for the corresponding flow will be shown below the string. However, if the unit of the main diagram is None, then quantities are never shown, regardless of the value of this argument.
trunklengthfloat

Length between the bases of the input and output groups (in data-space units).
pathlengthslist of float

List of lengths of the vertical arrows before break-in or after break-away. If a single value is given, then it will be applied to the first (inside) paths on the top and bottom, and the length of all other arrows will be justified accordingly. The pathlengths are not applied to the horizontal inputs and outputs.
priorint

Index of the prior diagram to which this diagram should be connected.
connect(int, int)

A (prior, this) tuple indexing the flow of the prior diagram and the flow of this diagram which should be connected. If this is the first diagram or prior is None, connect will be ignored.
rotationfloat

Angle of rotation of the diagram in degrees. The interpretation of the orientations argument will be rotated accordingly (e.g., if rotation == 90, an orientations entry of 1 means to/from the left). rotation is ignored if this diagram is connected to an existing one (using prior and connect).    Returns
 Sankey

The current Sankey instance.    Other Parameters
 **kwargs

Additional keyword arguments set matplotlib.patches.PathPatch properties, listed below. For example, one may want to use fill=False or label="A legend entry".
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 unknown
animated bool
antialiased or aa bool or None
capstyle CapStyle or {'butt', 'projecting', 'round'}
clip_box Bbox
clip_on bool
clip_path Patch or (Path, Transform) or None
color color
edgecolor or ec color or None
facecolor or fc color or None
figure Figure
fill bool
gid str
hatch {'/', '\', '|', '-', '+', 'x', 'o', 'O', '.', '*'}
in_layout bool
joinstyle JoinStyle or {'miter', 'round', 'bevel'}
label object
linestyle or ls {'-', '--', '-.', ':', '', (offset, on-off-seq), ...}
linewidth or lw float or None
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        See also  Sankey.finish

   finish()[source]

Adjust the axes and return a list of information about the Sankey subdiagram(s). Return value is a list of subdiagrams represented with the following fields:
Field Description
patch Sankey outline (an instance of PathPatch)
flows values of the flows (positive for input, negative for output)
angles list of angles of the arrows [deg/90] For example, if the diagram has not been rotated, an input to the top side will have an angle of 3 (DOWN), and an output from the top side will have an angle of 1 (UP). If a flow has been skipped (because its magnitude is less than tolerance), then its angle will be None.
tips array in which each row is an [x, y] pair indicating the positions of the tips (or "dips") of the flow paths If the magnitude of a flow is less the tolerance for the instance of Sankey, the flow is skipped and its tip will be at the center of the diagram.
text Text instance for the label of the diagram
texts list of Text instances for the labels of flows    See also  Sankey.add


classmatplotlib.sankey.Sankey(ax=None, scale=1.0, unit='', format='%G', gap=0.25, radius=0.1, shoulder=0.03, offset=0.15, head_angle=100, margin=0.4, tolerance=1e-06, **kwargs)[source]

Bases: object Sankey diagram. Sankey diagrams are a specific type of flow diagram, in which the width of the arrows is shown proportionally to the flow quantity. They are typically used to visualize energy or material or cost transfers between processes. Wikipedia (6/1/2011) Create a new Sankey instance. The optional arguments listed below are applied to all subdiagrams so that there is consistent alignment and formatting. In order to draw a complex Sankey diagram, create an instance of Sankey by calling it without any kwargs: sankey = Sankey()
 Then add simple Sankey sub-diagrams: sankey.add() # 1
sankey.add() # 2
#...
sankey.add() # n
 Finally, create the full diagram: sankey.finish()
 Or, instead, simply daisy-chain those calls: Sankey().add().add...  .add().finish()
  Other Parameters

axAxes

Axes onto which the data should be plotted. If ax isn't provided, new Axes will be created.
scalefloat

Scaling factor for the flows. scale sizes the width of the paths in order to maintain proper layout. The same scale is applied to all subdiagrams. The value should be chosen such that the product of the scale and the sum of the inputs is approximately 1.0 (and the product of the scale and the sum of the outputs is approximately -1.0).
unitstr

The physical unit associated with the flow quantities. If unit is None, then none of the quantities are labeled.
formatstr or callable

A Python number formatting string or callable used to label the flows with their quantities (i.e., a number times a unit, where the unit is given). If a format string is given, the label will be format % quantity. If a callable is given, it will be called with quantity as an argument.
gapfloat

Space between paths that break in/break away to/from the top or bottom.
radiusfloat

Inner radius of the vertical paths.
shoulderfloat

Size of the shoulders of output arrows.
offsetfloat

Text offset (from the dip or tip of the arrow).
head_anglefloat

Angle, in degrees, of the arrow heads (and negative of the angle of the tails).
marginfloat

Minimum space between Sankey outlines and the edge of the plot area.
tolerancefloat

Acceptable maximum of the magnitude of the sum of flows. The magnitude of the sum of connected flows cannot be greater than tolerance.  **kwargs

Any additional keyword arguments will be passed to add(), which will create the first subdiagram.      See also  Sankey.add
Sankey.finish
  Examples (Source code)    (png, pdf)      (png, pdf)      (png, pdf)     add(patchlabel='', flows=None, orientations=None, labels='', trunklength=1.0, pathlengths=0.25, prior=None, connect=(0, 0), rotation=0, **kwargs)[source]

Add a simple Sankey diagram with flows at the same hierarchical level.  Parameters

patchlabelstr

Label to be placed at the center of the diagram. Note that label (not patchlabel) can be passed as keyword argument to create an entry in the legend.
flowslist of float

Array of flow values. By convention, inputs are positive and outputs are negative. Flows are placed along the top of the diagram from the inside out in order of their index within flows. They are placed along the sides of the diagram from the top down and along the bottom from the outside in. If the sum of the inputs and outputs is nonzero, the discrepancy will appear as a cubic Bezier curve along the top and bottom edges of the trunk.
orientationslist of {-1, 0, 1}

List of orientations of the flows (or a single orientation to be used for all flows). Valid values are 0 (inputs from the left, outputs to the right), 1 (from and to the top) or -1 (from and to the bottom).
labelslist of (str or None)

List of labels for the flows (or a single label to be used for all flows). Each label may be None (no label), or a labeling string. If an entry is a (possibly empty) string, then the quantity for the corresponding flow will be shown below the string. However, if the unit of the main diagram is None, then quantities are never shown, regardless of the value of this argument.
trunklengthfloat

Length between the bases of the input and output groups (in data-space units).
pathlengthslist of float

List of lengths of the vertical arrows before break-in or after break-away. If a single value is given, then it will be applied to the first (inside) paths on the top and bottom, and the length of all other arrows will be justified accordingly. The pathlengths are not applied to the horizontal inputs and outputs.
priorint

Index of the prior diagram to which this diagram should be connected.
connect(int, int)

A (prior, this) tuple indexing the flow of the prior diagram and the flow of this diagram which should be connected. If this is the first diagram or prior is None, connect will be ignored.
rotationfloat

Angle of rotation of the diagram in degrees. The interpretation of the orientations argument will be rotated accordingly (e.g., if rotation == 90, an orientations entry of 1 means to/from the left). rotation is ignored if this diagram is connected to an existing one (using prior and connect).    Returns
 Sankey

The current Sankey instance.    Other Parameters
 **kwargs

Additional keyword arguments set matplotlib.patches.PathPatch properties, listed below. For example, one may want to use fill=False or label="A legend entry".
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 unknown
animated bool
antialiased or aa bool or None
capstyle CapStyle or {'butt', 'projecting', 'round'}
clip_box Bbox
clip_on bool
clip_path Patch or (Path, Transform) or None
color color
edgecolor or ec color or None
facecolor or fc color or None
figure Figure
fill bool
gid str
hatch {'/', '\', '|', '-', '+', 'x', 'o', 'O', '.', '*'}
in_layout bool
joinstyle JoinStyle or {'miter', 'round', 'bevel'}
label object
linestyle or ls {'-', '--', '-.', ':', '', (offset, on-off-seq), ...}
linewidth or lw float or None
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        See also  Sankey.finish

   finish()[source]

Adjust the axes and return a list of information about the Sankey subdiagram(s). Return value is a list of subdiagrams represented with the following fields:
Field Description
patch Sankey outline (an instance of PathPatch)
flows values of the flows (positive for input, negative for output)
angles list of angles of the arrows [deg/90] For example, if the diagram has not been rotated, an input to the top side will have an angle of 3 (DOWN), and an output from the top side will have an angle of 1 (UP). If a flow has been skipped (because its magnitude is less than tolerance), then its angle will be None.
tips array in which each row is an [x, y] pair indicating the positions of the tips (or "dips") of the flow paths If the magnitude of a flow is less the tolerance for the instance of Sankey, the flow is skipped and its tip will be at the center of the diagram.
text Text instance for the label of the diagram
texts list of Text instances for the labels of flows    See also  Sankey.add


add(patchlabel='', flows=None, orientations=None, labels='', trunklength=1.0, pathlengths=0.25, prior=None, connect=(0, 0), rotation=0, **kwargs)[source]

Add a simple Sankey diagram with flows at the same hierarchical level.  Parameters

patchlabelstr

Label to be placed at the center of the diagram. Note that label (not patchlabel) can be passed as keyword argument to create an entry in the legend.
flowslist of float

Array of flow values. By convention, inputs are positive and outputs are negative. Flows are placed along the top of the diagram from the inside out in order of their index within flows. They are placed along the sides of the diagram from the top down and along the bottom from the outside in. If the sum of the inputs and outputs is nonzero, the discrepancy will appear as a cubic Bezier curve along the top and bottom edges of the trunk.
orientationslist of {-1, 0, 1}

List of orientations of the flows (or a single orientation to be used for all flows). Valid values are 0 (inputs from the left, outputs to the right), 1 (from and to the top) or -1 (from and to the bottom).
labelslist of (str or None)

List of labels for the flows (or a single label to be used for all flows). Each label may be None (no label), or a labeling string. If an entry is a (possibly empty) string, then the quantity for the corresponding flow will be shown below the string. However, if the unit of the main diagram is None, then quantities are never shown, regardless of the value of this argument.
trunklengthfloat

Length between the bases of the input and output groups (in data-space units).
pathlengthslist of float

List of lengths of the vertical arrows before break-in or after break-away. If a single value is given, then it will be applied to the first (inside) paths on the top and bottom, and the length of all other arrows will be justified accordingly. The pathlengths are not applied to the horizontal inputs and outputs.
priorint

Index of the prior diagram to which this diagram should be connected.
connect(int, int)

A (prior, this) tuple indexing the flow of the prior diagram and the flow of this diagram which should be connected. If this is the first diagram or prior is None, connect will be ignored.
rotationfloat

Angle of rotation of the diagram in degrees. The interpretation of the orientations argument will be rotated accordingly (e.g., if rotation == 90, an orientations entry of 1 means to/from the left). rotation is ignored if this diagram is connected to an existing one (using prior and connect).    Returns
 Sankey

The current Sankey instance.    Other Parameters
 **kwargs

Additional keyword arguments set matplotlib.patches.PathPatch properties, listed below. For example, one may want to use fill=False or label="A legend entry".
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 unknown
animated bool
antialiased or aa bool or None
capstyle CapStyle or {'butt', 'projecting', 'round'}
clip_box Bbox
clip_on bool
clip_path Patch or (Path, Transform) or None
color color
edgecolor or ec color or None
facecolor or fc color or None
figure Figure
fill bool
gid str
hatch {'/', '\', '|', '-', '+', 'x', 'o', 'O', '.', '*'}
in_layout bool
joinstyle JoinStyle or {'miter', 'round', 'bevel'}
label object
linestyle or ls {'-', '--', '-.', ':', '', (offset, on-off-seq), ...}
linewidth or lw float or None
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        See also  Sankey.finish


finish()[source]

Adjust the axes and return a list of information about the Sankey subdiagram(s). Return value is a list of subdiagrams represented with the following fields:
Field Description
patch Sankey outline (an instance of PathPatch)
flows values of the flows (positive for input, negative for output)
angles list of angles of the arrows [deg/90] For example, if the diagram has not been rotated, an input to the top side will have an angle of 3 (DOWN), and an output from the top side will have an angle of 1 (UP). If a flow has been skipped (because its magnitude is less than tolerance), then its angle will be None.
tips array in which each row is an [x, y] pair indicating the positions of the tips (or "dips") of the flow paths If the magnitude of a flow is less the tolerance for the instance of Sankey, the flow is skipped and its tip will be at the center of the diagram.
text Text instance for the label of the diagram
texts list of Text instances for the labels of flows    See also  Sankey.add


matplotlib.scale Scales define the distribution of data values on an axis, e.g. a log scaling. They are defined as subclasses of ScaleBase. See also axes.Axes.set_xscale and the scales examples in the documentation. See Custom scale for a full example of defining a custom scale. Matplotlib also supports non-separable transformations that operate on both Axis at the same time. They are known as projections, and defined in matplotlib.projections.   classmatplotlib.scale.FuncScale(axis, functions)[source]

Bases: matplotlib.scale.ScaleBase Provide an arbitrary scale with user-supplied function for the axis.  Parameters

axisAxis

The axis for the scale.
functions(callable, callable)

two-tuple of the forward and inverse functions for the scale. The forward function must be monotonic. Both functions must have the signature: def forward(values: array-like) -> array-like
       get_transform()[source]

Return the FuncTransform associated with this scale.
   name='function'

   set_default_locators_and_formatters(axis)[source]

Set the locators and formatters of axis to instances suitable for this scale.

   classmatplotlib.scale.FuncScaleLog(axis, functions, base=10)[source]

Bases: matplotlib.scale.LogScale Provide an arbitrary scale with user-supplied function for the axis and then put on a logarithmic axes.  Parameters

axismatplotlib.axis.Axis

The axis for the scale.
functions(callable, callable)

two-tuple of the forward and inverse functions for the scale. The forward function must be monotonic. Both functions must have the signature: def forward(values: array-like) -> array-like

basefloat, default: 10

Logarithmic base of the scale.       propertybase

   get_transform()[source]

Return the Transform associated with this scale.
   name='functionlog'

   classmatplotlib.scale.FuncTransform(forward, inverse)[source]

Bases: matplotlib.transforms.Transform A simple transform that takes and arbitrary function for the forward and inverse transform.  Parameters

forwardcallable

The forward function for the transform. This function must have an inverse and, for best behavior, be monotonic. It must have the signature: def forward(values: array-like) -> array-like

inversecallable

The inverse of the forward function. Signature as forward.       has_inverse=True

True if this transform has a corresponding inverse transform.
   input_dims=1

The number of input dimensions of this transform. Must be overridden (with integers) in the subclass.
   inverted()[source]

Return the corresponding inverse transformation. It holds x == self.inverted().transform(self.transform(x)). The return value of this method should be treated as temporary. An update to self does not cause a corresponding update to its inverted copy.
   is_separable=True

True if this transform is separable in the x- and y- dimensions.
   output_dims=1

The number of output dimensions of this transform. Must be overridden (with integers) in the subclass.
   transform_non_affine(values)[source]

Apply only the non-affine part of this transformation. transform(values) is always equivalent to transform_affine(transform_non_affine(values)). In non-affine transformations, this is generally equivalent to transform(values). In affine transformations, this is always a no-op.  Parameters

valuesarray

The input values as NumPy array of length input_dims or shape (N x input_dims).    Returns
 array

The output values as NumPy array of length input_dims or shape (N x output_dims), depending on the input.

   classmatplotlib.scale.InvertedLogTransform(base)[source]

Bases: matplotlib.transforms.Transform  Parameters

shorthand_namestr

A string representing the "name" of the transform. The name carries no significance other than to improve the readability of str(transform) when DEBUG=True.       has_inverse=True

True if this transform has a corresponding inverse transform.
   input_dims=1

The number of input dimensions of this transform. Must be overridden (with integers) in the subclass.
   inverted()[source]

Return the corresponding inverse transformation. It holds x == self.inverted().transform(self.transform(x)). The return value of this method should be treated as temporary. An update to self does not cause a corresponding update to its inverted copy.
   is_separable=True

True if this transform is separable in the x- and y- dimensions.
   output_dims=1

The number of output dimensions of this transform. Must be overridden (with integers) in the subclass.
   transform_non_affine(a)[source]

Apply only the non-affine part of this transformation. transform(values) is always equivalent to transform_affine(transform_non_affine(values)). In non-affine transformations, this is generally equivalent to transform(values). In affine transformations, this is always a no-op.  Parameters

valuesarray

The input values as NumPy array of length input_dims or shape (N x input_dims).    Returns
 array

The output values as NumPy array of length input_dims or shape (N x output_dims), depending on the input.

   classmatplotlib.scale.InvertedSymmetricalLogTransform(base, linthresh, linscale)[source]

Bases: matplotlib.transforms.Transform  Parameters

shorthand_namestr

A string representing the "name" of the transform. The name carries no significance other than to improve the readability of str(transform) when DEBUG=True.       has_inverse=True

True if this transform has a corresponding inverse transform.
   input_dims=1

The number of input dimensions of this transform. Must be overridden (with integers) in the subclass.
   inverted()[source]

Return the corresponding inverse transformation. It holds x == self.inverted().transform(self.transform(x)). The return value of this method should be treated as temporary. An update to self does not cause a corresponding update to its inverted copy.
   is_separable=True

True if this transform is separable in the x- and y- dimensions.
   output_dims=1

The number of output dimensions of this transform. Must be overridden (with integers) in the subclass.
   transform_non_affine(a)[source]

Apply only the non-affine part of this transformation. transform(values) is always equivalent to transform_affine(transform_non_affine(values)). In non-affine transformations, this is generally equivalent to transform(values). In affine transformations, this is always a no-op.  Parameters

valuesarray

The input values as NumPy array of length input_dims or shape (N x input_dims).    Returns
 array

The output values as NumPy array of length input_dims or shape (N x output_dims), depending on the input.

   classmatplotlib.scale.LinearScale(axis)[source]

Bases: matplotlib.scale.ScaleBase The default linear scale.   get_transform()[source]

Return the transform for linear scaling, which is just the IdentityTransform.
   name='linear'

   set_default_locators_and_formatters(axis)[source]

Set the locators and formatters of axis to instances suitable for this scale.

   classmatplotlib.scale.LogScale(axis, *, base=10, subs=None, nonpositive='clip')[source]

Bases: matplotlib.scale.ScaleBase A standard logarithmic scale. Care is taken to only plot positive values.  Parameters

axisAxis

The axis for the scale.
basefloat, default: 10

The base of the logarithm.
nonpositive{'clip', 'mask'}, default: 'clip'

Determines the behavior for non-positive values. They can either be masked as invalid, or clipped to a very small positive number.
subssequence of int, default: None

Where to place the subticks between each major tick. For example, in a log10 scale, [2, 3, 4, 5, 6, 7, 8, 9] will place 8 logarithmically spaced minor ticks between each major tick.       propertybase

   get_transform()[source]

Return the LogTransform associated with this scale.
   limit_range_for_scale(vmin, vmax, minpos)[source]

Limit the domain to positive values.
   name='log'

   set_default_locators_and_formatters(axis)[source]

Set the locators and formatters of axis to instances suitable for this scale.

   classmatplotlib.scale.LogTransform(base, nonpositive='clip')[source]

Bases: matplotlib.transforms.Transform  Parameters

shorthand_namestr

A string representing the "name" of the transform. The name carries no significance other than to improve the readability of str(transform) when DEBUG=True.       has_inverse=True

True if this transform has a corresponding inverse transform.
   input_dims=1

The number of input dimensions of this transform. Must be overridden (with integers) in the subclass.
   inverted()[source]

Return the corresponding inverse transformation. It holds x == self.inverted().transform(self.transform(x)). The return value of this method should be treated as temporary. An update to self does not cause a corresponding update to its inverted copy.
   is_separable=True

True if this transform is separable in the x- and y- dimensions.
   output_dims=1

The number of output dimensions of this transform. Must be overridden (with integers) in the subclass.
   transform_non_affine(a)[source]

Apply only the non-affine part of this transformation. transform(values) is always equivalent to transform_affine(transform_non_affine(values)). In non-affine transformations, this is generally equivalent to transform(values). In affine transformations, this is always a no-op.  Parameters

valuesarray

The input values as NumPy array of length input_dims or shape (N x input_dims).    Returns
 array

The output values as NumPy array of length input_dims or shape (N x output_dims), depending on the input.

   classmatplotlib.scale.LogisticTransform(nonpositive='mask')[source]

Bases: matplotlib.transforms.Transform  Parameters

shorthand_namestr

A string representing the "name" of the transform. The name carries no significance other than to improve the readability of str(transform) when DEBUG=True.       has_inverse=True

True if this transform has a corresponding inverse transform.
   input_dims=1

The number of input dimensions of this transform. Must be overridden (with integers) in the subclass.
   inverted()[source]

Return the corresponding inverse transformation. It holds x == self.inverted().transform(self.transform(x)). The return value of this method should be treated as temporary. An update to self does not cause a corresponding update to its inverted copy.
   is_separable=True

True if this transform is separable in the x- and y- dimensions.
   output_dims=1

The number of output dimensions of this transform. Must be overridden (with integers) in the subclass.
   transform_non_affine(a)[source]

logistic transform (base 10)

   classmatplotlib.scale.LogitScale(axis, nonpositive='mask', *, one_half='\x0crac{1}{2}', use_overline=False)[source]

Bases: matplotlib.scale.ScaleBase Logit scale for data between zero and one, both excluded. This scale is similar to a log scale close to zero and to one, and almost linear around 0.5. It maps the interval ]0, 1[ onto ]-infty, +infty[.  Parameters

axismatplotlib.axis.Axis

Currently unused.
nonpositive{'mask', 'clip'}

Determines the behavior for values beyond the open interval ]0, 1[. They can either be masked as invalid, or clipped to a number very close to 0 or 1.
use_overlinebool, default: False

Indicate the usage of survival notation (overline{x}) in place of standard notation (1-x) for probability close to one.
one_halfstr, default: r"frac{1}{2}"

The string used for ticks formatter to represent 1/2.       get_transform()[source]

Return the LogitTransform associated with this scale.
   limit_range_for_scale(vmin, vmax, minpos)[source]

Limit the domain to values between 0 and 1 (excluded).
   name='logit'

   set_default_locators_and_formatters(axis)[source]

Set the locators and formatters of axis to instances suitable for this scale.

   classmatplotlib.scale.LogitTransform(nonpositive='mask')[source]

Bases: matplotlib.transforms.Transform  Parameters

shorthand_namestr

A string representing the "name" of the transform. The name carries no significance other than to improve the readability of str(transform) when DEBUG=True.       has_inverse=True

True if this transform has a corresponding inverse transform.
   input_dims=1

The number of input dimensions of this transform. Must be overridden (with integers) in the subclass.
   inverted()[source]

Return the corresponding inverse transformation. It holds x == self.inverted().transform(self.transform(x)). The return value of this method should be treated as temporary. An update to self does not cause a corresponding update to its inverted copy.
   is_separable=True

True if this transform is separable in the x- and y- dimensions.
   output_dims=1

The number of output dimensions of this transform. Must be overridden (with integers) in the subclass.
   transform_non_affine(a)[source]

logit transform (base 10), masked or clipped

   classmatplotlib.scale.ScaleBase(axis)[source]

Bases: object The base class for all scales. Scales are separable transformations, working on a single dimension. Subclasses should override  name

The scale's name.  get_transform()

A method returning a Transform, which converts data coordinates to scaled coordinates. This transform should be invertible, so that e.g. mouse positions can be converted back to data coordinates.  set_default_locators_and_formatters()

A method that sets default locators and formatters for an Axis that uses this scale.  limit_range_for_scale()

An optional method that "fixes" the axis range to acceptable values, e.g. restricting log-scaled axes to positive values.   Construct a new scale. Notes The following note is for scale implementors. For back-compatibility reasons, scales take an Axis object as first argument. However, this argument should not be used: a single scale object should be usable by multiple Axises at the same time.   get_transform()[source]

Return the Transform object associated with this scale.
   limit_range_for_scale(vmin, vmax, minpos)[source]

Return the range vmin, vmax, restricted to the domain supported by this scale (if any). minpos should be the minimum positive value in the data. This is used by log scales to determine a minimum value.
   set_default_locators_and_formatters(axis)[source]

Set the locators and formatters of axis to instances suitable for this scale.

   classmatplotlib.scale.SymmetricalLogScale(axis, *, base=10, linthresh=2, subs=None, linscale=1)[source]

Bases: matplotlib.scale.ScaleBase The symmetrical logarithmic scale is logarithmic in both the positive and negative directions from the origin. Since the values close to zero tend toward infinity, there is a need to have a range around zero that is linear. The parameter linthresh allows the user to specify the size of this range (-linthresh, linthresh).  Parameters

basefloat, default: 10

The base of the logarithm.
linthreshfloat, default: 2

Defines the range (-x, x), within which the plot is linear. This avoids having the plot go to infinity around zero.
subssequence of int

Where to place the subticks between each major tick. For example, in a log10 scale: [2, 3, 4, 5, 6, 7, 8, 9] will place 8 logarithmically spaced minor ticks between each major tick.
linscalefloat, optional

This allows the linear range (-linthresh, linthresh) to be stretched relative to the logarithmic range. Its value is the number of decades to use for each half of the linear range. For example, when linscale == 1.0 (the default), the space used for the positive and negative halves of the linear range will be equal to one decade in the logarithmic range.     Construct a new scale. Notes The following note is for scale implementors. For back-compatibility reasons, scales take an Axis object as first argument. However, this argument should not be used: a single scale object should be usable by multiple Axises at the same time.   propertybase

   get_transform()[source]

Return the SymmetricalLogTransform associated with this scale.
   propertylinscale

   propertylinthresh

   name='symlog'

   set_default_locators_and_formatters(axis)[source]

Set the locators and formatters of axis to instances suitable for this scale.

   classmatplotlib.scale.SymmetricalLogTransform(base, linthresh, linscale)[source]

Bases: matplotlib.transforms.Transform  Parameters

shorthand_namestr

A string representing the "name" of the transform. The name carries no significance other than to improve the readability of str(transform) when DEBUG=True.       has_inverse=True

True if this transform has a corresponding inverse transform.
   input_dims=1

The number of input dimensions of this transform. Must be overridden (with integers) in the subclass.
   inverted()[source]

Return the corresponding inverse transformation. It holds x == self.inverted().transform(self.transform(x)). The return value of this method should be treated as temporary. An update to self does not cause a corresponding update to its inverted copy.
   is_separable=True

True if this transform is separable in the x- and y- dimensions.
   output_dims=1

The number of output dimensions of this transform. Must be overridden (with integers) in the subclass.
   transform_non_affine(a)[source]

Apply only the non-affine part of this transformation. transform(values) is always equivalent to transform_affine(transform_non_affine(values)). In non-affine transformations, this is generally equivalent to transform(values). In affine transformations, this is always a no-op.  Parameters

valuesarray

The input values as NumPy array of length input_dims or shape (N x input_dims).    Returns
 array

The output values as NumPy array of length input_dims or shape (N x output_dims), depending on the input.

   matplotlib.scale.get_scale_names()[source]

Return the names of the available scales.
   matplotlib.scale.register_scale(scale_class)[source]

Register a new kind of scale.  Parameters

scale_classsubclass of ScaleBase

The scale to register.
   matplotlib.scale.scale_factory(scale, axis, **kwargs)[source]

Return a scale class by name.  Parameters

scale{'function', 'functionlog', 'linear', 'log', 'logit', 'symlog'}

axismatplotlib.axis.Axis


classmatplotlib.scale.FuncScale(axis, functions)[source]

Bases: matplotlib.scale.ScaleBase Provide an arbitrary scale with user-supplied function for the axis.  Parameters

axisAxis

The axis for the scale.
functions(callable, callable)

two-tuple of the forward and inverse functions for the scale. The forward function must be monotonic. Both functions must have the signature: def forward(values: array-like) -> array-like
       get_transform()[source]

Return the FuncTransform associated with this scale.
   name='function'

   set_default_locators_and_formatters(axis)[source]

Set the locators and formatters of axis to instances suitable for this scale.


get_transform()[source]

Return the FuncTransform associated with this scale.


set_default_locators_and_formatters(axis)[source]

Set the locators and formatters of axis to instances suitable for this scale.


classmatplotlib.scale.FuncScaleLog(axis, functions, base=10)[source]

Bases: matplotlib.scale.LogScale Provide an arbitrary scale with user-supplied function for the axis and then put on a logarithmic axes.  Parameters

axismatplotlib.axis.Axis

The axis for the scale.
functions(callable, callable)

two-tuple of the forward and inverse functions for the scale. The forward function must be monotonic. Both functions must have the signature: def forward(values: array-like) -> array-like

basefloat, default: 10

Logarithmic base of the scale.       propertybase

   get_transform()[source]

Return the Transform associated with this scale.
   name='functionlog'


get_transform()[source]

Return the Transform associated with this scale.


classmatplotlib.scale.FuncTransform(forward, inverse)[source]

Bases: matplotlib.transforms.Transform A simple transform that takes and arbitrary function for the forward and inverse transform.  Parameters

forwardcallable

The forward function for the transform. This function must have an inverse and, for best behavior, be monotonic. It must have the signature: def forward(values: array-like) -> array-like

inversecallable

The inverse of the forward function. Signature as forward.       has_inverse=True

True if this transform has a corresponding inverse transform.
   input_dims=1

The number of input dimensions of this transform. Must be overridden (with integers) in the subclass.
   inverted()[source]

Return the corresponding inverse transformation. It holds x == self.inverted().transform(self.transform(x)). The return value of this method should be treated as temporary. An update to self does not cause a corresponding update to its inverted copy.
   is_separable=True

True if this transform is separable in the x- and y- dimensions.
   output_dims=1

The number of output dimensions of this transform. Must be overridden (with integers) in the subclass.
   transform_non_affine(values)[source]

Apply only the non-affine part of this transformation. transform(values) is always equivalent to transform_affine(transform_non_affine(values)). In non-affine transformations, this is generally equivalent to transform(values). In affine transformations, this is always a no-op.  Parameters

valuesarray

The input values as NumPy array of length input_dims or shape (N x input_dims).    Returns
 array

The output values as NumPy array of length input_dims or shape (N x output_dims), depending on the input.


has_inverse=True

True if this transform has a corresponding inverse transform.


input_dims=1

The number of input dimensions of this transform. Must be overridden (with integers) in the subclass.


inverted()[source]

Return the corresponding inverse transformation. It holds x == self.inverted().transform(self.transform(x)). The return value of this method should be treated as temporary. An update to self does not cause a corresponding update to its inverted copy.


is_separable=True

True if this transform is separable in the x- and y- dimensions.


output_dims=1

The number of output dimensions of this transform. Must be overridden (with integers) in the subclass.


transform_non_affine(values)[source]

Apply only the non-affine part of this transformation. transform(values) is always equivalent to transform_affine(transform_non_affine(values)). In non-affine transformations, this is generally equivalent to transform(values). In affine transformations, this is always a no-op.  Parameters

valuesarray

The input values as NumPy array of length input_dims or shape (N x input_dims).    Returns
 array

The output values as NumPy array of length input_dims or shape (N x output_dims), depending on the input.


matplotlib.scale.get_scale_names()[source]

Return the names of the available scales.


classmatplotlib.scale.InvertedLogTransform(base)[source]

Bases: matplotlib.transforms.Transform  Parameters

shorthand_namestr

A string representing the "name" of the transform. The name carries no significance other than to improve the readability of str(transform) when DEBUG=True.       has_inverse=True

True if this transform has a corresponding inverse transform.
   input_dims=1

The number of input dimensions of this transform. Must be overridden (with integers) in the subclass.
   inverted()[source]

Return the corresponding inverse transformation. It holds x == self.inverted().transform(self.transform(x)). The return value of this method should be treated as temporary. An update to self does not cause a corresponding update to its inverted copy.
   is_separable=True

True if this transform is separable in the x- and y- dimensions.
   output_dims=1

The number of output dimensions of this transform. Must be overridden (with integers) in the subclass.
   transform_non_affine(a)[source]

Apply only the non-affine part of this transformation. transform(values) is always equivalent to transform_affine(transform_non_affine(values)). In non-affine transformations, this is generally equivalent to transform(values). In affine transformations, this is always a no-op.  Parameters

valuesarray

The input values as NumPy array of length input_dims or shape (N x input_dims).    Returns
 array

The output values as NumPy array of length input_dims or shape (N x output_dims), depending on the input.


transform_non_affine(a)[source]

Apply only the non-affine part of this transformation. transform(values) is always equivalent to transform_affine(transform_non_affine(values)). In non-affine transformations, this is generally equivalent to transform(values). In affine transformations, this is always a no-op.  Parameters

valuesarray

The input values as NumPy array of length input_dims or shape (N x input_dims).    Returns
 array

The output values as NumPy array of length input_dims or shape (N x output_dims), depending on the input.


classmatplotlib.scale.InvertedSymmetricalLogTransform(base, linthresh, linscale)[source]

Bases: matplotlib.transforms.Transform  Parameters

shorthand_namestr

A string representing the "name" of the transform. The name carries no significance other than to improve the readability of str(transform) when DEBUG=True.       has_inverse=True

True if this transform has a corresponding inverse transform.
   input_dims=1

The number of input dimensions of this transform. Must be overridden (with integers) in the subclass.
   inverted()[source]

Return the corresponding inverse transformation. It holds x == self.inverted().transform(self.transform(x)). The return value of this method should be treated as temporary. An update to self does not cause a corresponding update to its inverted copy.
   is_separable=True

True if this transform is separable in the x- and y- dimensions.
   output_dims=1

The number of output dimensions of this transform. Must be overridden (with integers) in the subclass.
   transform_non_affine(a)[source]

Apply only the non-affine part of this transformation. transform(values) is always equivalent to transform_affine(transform_non_affine(values)). In non-affine transformations, this is generally equivalent to transform(values). In affine transformations, this is always a no-op.  Parameters

valuesarray

The input values as NumPy array of length input_dims or shape (N x input_dims).    Returns
 array

The output values as NumPy array of length input_dims or shape (N x output_dims), depending on the input.


classmatplotlib.scale.LinearScale(axis)[source]

Bases: matplotlib.scale.ScaleBase The default linear scale.   get_transform()[source]

Return the transform for linear scaling, which is just the IdentityTransform.
   name='linear'

   set_default_locators_and_formatters(axis)[source]

Set the locators and formatters of axis to instances suitable for this scale.


get_transform()[source]

Return the transform for linear scaling, which is just the IdentityTransform.


classmatplotlib.scale.LogisticTransform(nonpositive='mask')[source]

Bases: matplotlib.transforms.Transform  Parameters

shorthand_namestr

A string representing the "name" of the transform. The name carries no significance other than to improve the readability of str(transform) when DEBUG=True.       has_inverse=True

True if this transform has a corresponding inverse transform.
   input_dims=1

The number of input dimensions of this transform. Must be overridden (with integers) in the subclass.
   inverted()[source]

Return the corresponding inverse transformation. It holds x == self.inverted().transform(self.transform(x)). The return value of this method should be treated as temporary. An update to self does not cause a corresponding update to its inverted copy.
   is_separable=True

True if this transform is separable in the x- and y- dimensions.
   output_dims=1

The number of output dimensions of this transform. Must be overridden (with integers) in the subclass.
   transform_non_affine(a)[source]

logistic transform (base 10)


transform_non_affine(a)[source]

logistic transform (base 10)


classmatplotlib.scale.LogitScale(axis, nonpositive='mask', *, one_half='\x0crac{1}{2}', use_overline=False)[source]

Bases: matplotlib.scale.ScaleBase Logit scale for data between zero and one, both excluded. This scale is similar to a log scale close to zero and to one, and almost linear around 0.5. It maps the interval ]0, 1[ onto ]-infty, +infty[.  Parameters

axismatplotlib.axis.Axis

Currently unused.
nonpositive{'mask', 'clip'}

Determines the behavior for values beyond the open interval ]0, 1[. They can either be masked as invalid, or clipped to a number very close to 0 or 1.
use_overlinebool, default: False

Indicate the usage of survival notation (overline{x}) in place of standard notation (1-x) for probability close to one.
one_halfstr, default: r"frac{1}{2}"

The string used for ticks formatter to represent 1/2.       get_transform()[source]

Return the LogitTransform associated with this scale.
   limit_range_for_scale(vmin, vmax, minpos)[source]

Limit the domain to values between 0 and 1 (excluded).
   name='logit'

   set_default_locators_and_formatters(axis)[source]

Set the locators and formatters of axis to instances suitable for this scale.


get_transform()[source]

Return the LogitTransform associated with this scale.


limit_range_for_scale(vmin, vmax, minpos)[source]

Limit the domain to values between 0 and 1 (excluded).


set_default_locators_and_formatters(axis)[source]

Set the locators and formatters of axis to instances suitable for this scale.


classmatplotlib.scale.LogitTransform(nonpositive='mask')[source]

Bases: matplotlib.transforms.Transform  Parameters

shorthand_namestr

A string representing the "name" of the transform. The name carries no significance other than to improve the readability of str(transform) when DEBUG=True.       has_inverse=True

True if this transform has a corresponding inverse transform.
   input_dims=1

The number of input dimensions of this transform. Must be overridden (with integers) in the subclass.
   inverted()[source]

Return the corresponding inverse transformation. It holds x == self.inverted().transform(self.transform(x)). The return value of this method should be treated as temporary. An update to self does not cause a corresponding update to its inverted copy.
   is_separable=True

True if this transform is separable in the x- and y- dimensions.
   output_dims=1

The number of output dimensions of this transform. Must be overridden (with integers) in the subclass.
   transform_non_affine(a)[source]

logit transform (base 10), masked or clipped


has_inverse=True

True if this transform has a corresponding inverse transform.


input_dims=1

The number of input dimensions of this transform. Must be overridden (with integers) in the subclass.


inverted()[source]

Return the corresponding inverse transformation. It holds x == self.inverted().transform(self.transform(x)). The return value of this method should be treated as temporary. An update to self does not cause a corresponding update to its inverted copy.


is_separable=True

True if this transform is separable in the x- and y- dimensions.


output_dims=1

The number of output dimensions of this transform. Must be overridden (with integers) in the subclass.


transform_non_affine(a)[source]

logit transform (base 10), masked or clipped


classmatplotlib.scale.LogScale(axis, *, base=10, subs=None, nonpositive='clip')[source]

Bases: matplotlib.scale.ScaleBase A standard logarithmic scale. Care is taken to only plot positive values.  Parameters

axisAxis

The axis for the scale.
basefloat, default: 10

The base of the logarithm.
nonpositive{'clip', 'mask'}, default: 'clip'

Determines the behavior for non-positive values. They can either be masked as invalid, or clipped to a very small positive number.
subssequence of int, default: None

Where to place the subticks between each major tick. For example, in a log10 scale, [2, 3, 4, 5, 6, 7, 8, 9] will place 8 logarithmically spaced minor ticks between each major tick.       propertybase

   get_transform()[source]

Return the LogTransform associated with this scale.
   limit_range_for_scale(vmin, vmax, minpos)[source]

Limit the domain to positive values.
   name='log'

   set_default_locators_and_formatters(axis)[source]

Set the locators and formatters of axis to instances suitable for this scale.


get_transform()[source]

Return the LogTransform associated with this scale.


limit_range_for_scale(vmin, vmax, minpos)[source]

Limit the domain to positive values.


classmatplotlib.scale.LogTransform(base, nonpositive='clip')[source]

Bases: matplotlib.transforms.Transform  Parameters

shorthand_namestr

A string representing the "name" of the transform. The name carries no significance other than to improve the readability of str(transform) when DEBUG=True.       has_inverse=True

True if this transform has a corresponding inverse transform.
   input_dims=1

The number of input dimensions of this transform. Must be overridden (with integers) in the subclass.
   inverted()[source]

Return the corresponding inverse transformation. It holds x == self.inverted().transform(self.transform(x)). The return value of this method should be treated as temporary. An update to self does not cause a corresponding update to its inverted copy.
   is_separable=True

True if this transform is separable in the x- and y- dimensions.
   output_dims=1

The number of output dimensions of this transform. Must be overridden (with integers) in the subclass.
   transform_non_affine(a)[source]

Apply only the non-affine part of this transformation. transform(values) is always equivalent to transform_affine(transform_non_affine(values)). In non-affine transformations, this is generally equivalent to transform(values). In affine transformations, this is always a no-op.  Parameters

valuesarray

The input values as NumPy array of length input_dims or shape (N x input_dims).    Returns
 array

The output values as NumPy array of length input_dims or shape (N x output_dims), depending on the input.


transform_non_affine(a)[source]

Apply only the non-affine part of this transformation. transform(values) is always equivalent to transform_affine(transform_non_affine(values)). In non-affine transformations, this is generally equivalent to transform(values). In affine transformations, this is always a no-op.  Parameters

valuesarray

The input values as NumPy array of length input_dims or shape (N x input_dims).    Returns
 array

The output values as NumPy array of length input_dims or shape (N x output_dims), depending on the input.


matplotlib.scale.register_scale(scale_class)[source]

Register a new kind of scale.  Parameters

scale_classsubclass of ScaleBase

The scale to register.


matplotlib.scale.scale_factory(scale, axis, **kwargs)[source]

Return a scale class by name.  Parameters

scale{'function', 'functionlog', 'linear', 'log', 'logit', 'symlog'}

axismatplotlib.axis.Axis


classmatplotlib.scale.ScaleBase(axis)[source]

Bases: object The base class for all scales. Scales are separable transformations, working on a single dimension. Subclasses should override  name

The scale's name.  get_transform()

A method returning a Transform, which converts data coordinates to scaled coordinates. This transform should be invertible, so that e.g. mouse positions can be converted back to data coordinates.  set_default_locators_and_formatters()

A method that sets default locators and formatters for an Axis that uses this scale.  limit_range_for_scale()

An optional method that "fixes" the axis range to acceptable values, e.g. restricting log-scaled axes to positive values.   Construct a new scale. Notes The following note is for scale implementors. For back-compatibility reasons, scales take an Axis object as first argument. However, this argument should not be used: a single scale object should be usable by multiple Axises at the same time.   get_transform()[source]

Return the Transform object associated with this scale.
   limit_range_for_scale(vmin, vmax, minpos)[source]

Return the range vmin, vmax, restricted to the domain supported by this scale (if any). minpos should be the minimum positive value in the data. This is used by log scales to determine a minimum value.
   set_default_locators_and_formatters(axis)[source]

Set the locators and formatters of axis to instances suitable for this scale.


get_transform()[source]

Return the Transform object associated with this scale.


limit_range_for_scale(vmin, vmax, minpos)[source]

Return the range vmin, vmax, restricted to the domain supported by this scale (if any). minpos should be the minimum positive value in the data. This is used by log scales to determine a minimum value.


set_default_locators_and_formatters(axis)[source]

Set the locators and formatters of axis to instances suitable for this scale.


classmatplotlib.scale.SymmetricalLogScale(axis, *, base=10, linthresh=2, subs=None, linscale=1)[source]

Bases: matplotlib.scale.ScaleBase The symmetrical logarithmic scale is logarithmic in both the positive and negative directions from the origin. Since the values close to zero tend toward infinity, there is a need to have a range around zero that is linear. The parameter linthresh allows the user to specify the size of this range (-linthresh, linthresh).  Parameters

basefloat, default: 10

The base of the logarithm.
linthreshfloat, default: 2

Defines the range (-x, x), within which the plot is linear. This avoids having the plot go to infinity around zero.
subssequence of int

Where to place the subticks between each major tick. For example, in a log10 scale: [2, 3, 4, 5, 6, 7, 8, 9] will place 8 logarithmically spaced minor ticks between each major tick.
linscalefloat, optional

This allows the linear range (-linthresh, linthresh) to be stretched relative to the logarithmic range. Its value is the number of decades to use for each half of the linear range. For example, when linscale == 1.0 (the default), the space used for the positive and negative halves of the linear range will be equal to one decade in the logarithmic range.     Construct a new scale. Notes The following note is for scale implementors. For back-compatibility reasons, scales take an Axis object as first argument. However, this argument should not be used: a single scale object should be usable by multiple Axises at the same time.   propertybase

   get_transform()[source]

Return the SymmetricalLogTransform associated with this scale.
   propertylinscale

   propertylinthresh

   name='symlog'

   set_default_locators_and_formatters(axis)[source]

Set the locators and formatters of axis to instances suitable for this scale.


get_transform()[source]

Return the SymmetricalLogTransform associated with this scale.


classmatplotlib.scale.SymmetricalLogTransform(base, linthresh, linscale)[source]

Bases: matplotlib.transforms.Transform  Parameters

shorthand_namestr

A string representing the "name" of the transform. The name carries no significance other than to improve the readability of str(transform) when DEBUG=True.       has_inverse=True

True if this transform has a corresponding inverse transform.
   input_dims=1

The number of input dimensions of this transform. Must be overridden (with integers) in the subclass.
   inverted()[source]

Return the corresponding inverse transformation. It holds x == self.inverted().transform(self.transform(x)). The return value of this method should be treated as temporary. An update to self does not cause a corresponding update to its inverted copy.
   is_separable=True

True if this transform is separable in the x- and y- dimensions.
   output_dims=1

The number of output dimensions of this transform. Must be overridden (with integers) in the subclass.
   transform_non_affine(a)[source]

Apply only the non-affine part of this transformation. transform(values) is always equivalent to transform_affine(transform_non_affine(values)). In non-affine transformations, this is generally equivalent to transform(values). In affine transformations, this is always a no-op.  Parameters

valuesarray

The input values as NumPy array of length input_dims or shape (N x input_dims).    Returns
 array

The output values as NumPy array of length input_dims or shape (N x output_dims), depending on the input.


has_inverse=True

True if this transform has a corresponding inverse transform.


input_dims=1

The number of input dimensions of this transform. Must be overridden (with integers) in the subclass.


inverted()[source]

Return the corresponding inverse transformation. It holds x == self.inverted().transform(self.transform(x)). The return value of this method should be treated as temporary. An update to self does not cause a corresponding update to its inverted copy.


is_separable=True

True if this transform is separable in the x- and y- dimensions.


output_dims=1

The number of output dimensions of this transform. Must be overridden (with integers) in the subclass.


matplotlib.set_loglevel(level)[source]

Set Matplotlib's root logger and root logger handler level, creating the handler if it does not exist yet. Typically, one should call set_loglevel("info") or set_loglevel("debug") to get additional debugging information.  Parameters

level{"notset", "debug", "info", "warning", "error", "critical"}

The log level of the handler.     Notes The first time this function is called, an additional handler is attached to Matplotlib's root handler; this handler is reused every time and this function simply manipulates the logger and handler's level.


matplotlib.sphinxext.mathmpl  A role and directive to display mathtext in Sphinx  Warning In most cases, you will likely want to use one of Sphinx's builtin Math extensions instead of this one.  Mathtext may be included in two ways:
Inline, using the role: This text uses inline math: :mathmpl:`\alpha > \beta`.
 which produces: This text uses inline math: .
Standalone, using the directive: Here is some standalone math:

.. mathmpl::

    \alpha > \beta
 which produces: Here is some standalone math:     Options The mathmpl role and directive both support the following options:  fontsetstr, default: 'cm'

The font set to use when displaying math. See rcParams["mathtext.fontset"] (default: 'dejavusans').  fontsizefloat

The font size, in points. Defaults to the value from the extension configuration option defined below.     Configuration options The mathtext extension has the following configuration options:  mathmpl_fontsizefloat, default: 10.0

Default font size, in points.  mathmpl_srcsetlist of str, default: []

Additional image sizes to generate when embedding in HTML, to support responsive resolution images. The list should contain additional x-descriptors ('1.5x', '2x', etc.) to generate (1x is the default and always included.)     classmatplotlib.sphinxext.mathmpl.MathDirective(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)[source]

The .. mathmpl:: directive, as documented in the module's docstring.


classmatplotlib.sphinxext.mathmpl.MathDirective(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)[source]

The .. mathmpl:: directive, as documented in the module's docstring.


matplotlib.sphinxext.plot_directive  A directive for including a Matplotlib plot in a Sphinx document By default, in HTML output, plot will include a .png file with a link to a high-res .png and .pdf. In LaTeX output, it will include a .pdf. The source code for the plot may be included in one of three ways:
A path to a source file as the argument to the directive: .. plot:: path/to/plot.py
 When a path to a source file is given, the content of the directive may optionally contain a caption for the plot: .. plot:: path/to/plot.py

   The plot caption.
 Additionally, one may specify the name of a function to call (with no arguments) immediately after importing the module: .. plot:: path/to/plot.py plot_function1

Included as inline content to the directive: .. plot::

   import matplotlib.pyplot as plt
   import matplotlib.image as mpimg
   import numpy as np
   img = mpimg.imread('_static/stinkbug.png')
   imgplot = plt.imshow(img)

Using doctest syntax: .. plot::

   A plotting example:
   >>> import matplotlib.pyplot as plt
   >>> plt.plot([1, 2, 3], [4, 5, 6])
    Options The plot directive supports the following options:  format{'python', 'doctest'}

The format of the input. If unset, the format is auto-detected.  include-sourcebool

Whether to display the source code. The default can be changed using the plot_include_source variable in conf.py (which itself defaults to False).  encodingstr

If this source file is in a non-UTF8 or non-ASCII encoding, the encoding must be specified using the :encoding: option. The encoding will not be inferred using the -*- coding -*- metacomment.  contextbool or str

If provided, the code will be run in the context of all previous plot directives for which the :context: option was specified. This only applies to inline code plot directives, not those run from files. If the :context: reset option is specified, the context is reset for this and future plots, and previous figures are closed prior to running the code. :context: close-figs keeps the context but closes previous figures before running the code.  nofigsbool

If specified, the code block will be run, but no figures will be inserted. This is usually useful with the :context: option.  captionstr

If specified, the option's argument will be used as a caption for the figure. This overwrites the caption given in the content, when the plot is generated from a file.   Additionally, this directive supports all of the options of the image directive, except for target (since plot will add its own target). These include alt, height, width, scale, align and class.   Configuration options The plot directive has the following configuration options:  plot_include_source

Default value for the include-source option (default: False).  plot_html_show_source_link

Whether to show a link to the source in HTML (default: True).  plot_pre_code

Code that should be executed before each plot. If None (the default), it will default to a string containing: import numpy as np
from matplotlib import pyplot as plt
  plot_basedir

Base directory, to which plot:: file names are relative to. If None or empty (the default), file names are relative to the directory where the file containing the directive is.  plot_formats

File formats to generate (default: ['png', 'hires.png', 'pdf']). List of tuples or strings: [(suffix, dpi), suffix, ...]
 that determine the file format and the DPI. For entries whose DPI was omitted, sensible defaults are chosen. When passing from the command line through sphinx_build the list should be passed as suffix:dpi,suffix:dpi, ...  plot_html_show_formats

Whether to show links to the files in HTML (default: True).  plot_rcparams

A dictionary containing any non-standard rcParams that should be applied before each plot (default: {}).  plot_apply_rcparams

By default, rcParams are applied when :context: option is not used in a plot directive. If set, this configuration option overrides this behavior and applies rcParams before each plot.  plot_working_directory

By default, the working directory will be changed to the directory of the example, so the code can get at its data files, if any. Also its path will be added to sys.path so it can import any helper modules sitting beside it. This configuration option can be used to specify a central directory (also added to sys.path) where data files and helper modules for all code are located.  plot_template

Provide a customized template for preparing restructured text.     classmatplotlib.sphinxext.plot_directive.PlotDirective(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)[source]

The .. plot:: directive, as documented in the module's docstring.   run()[source]

Run the plot directive.

   exceptionmatplotlib.sphinxext.plot_directive.PlotError[source]

   matplotlib.sphinxext.plot_directive.mark_plot_labels(app, document)[source]

To make plots referenceable, we need to move the reference from the "htmlonly" (or "latexonly") node to the actual figure node itself.
   matplotlib.sphinxext.plot_directive.out_of_date(original, derived, includes=None)[source]

Return whether derived is out-of-date relative to original or any of the RST files included in it using the RST include directive (includes). derived and original are full paths, and includes is optionally a list of full paths which may have been included in the original.
   matplotlib.sphinxext.plot_directive.render_figures(code, code_path, output_dir, output_base, context, function_name, config, context_reset=False, close_figs=False, code_includes=None)[source]

Run a pyplot script and save the images in output_dir. Save the images under output_dir with file names derived from output_base
   matplotlib.sphinxext.plot_directive.run_code(code, code_path, ns=None, function_name=None)[source]

[Deprecated] Import a Python module from a path, and run the function given by name, if function_name is not None. Notes  Deprecated since version 3.5.
   matplotlib.sphinxext.plot_directive.split_code_at_show(text)[source]

[Deprecated] Split code at plt.show(). Notes  Deprecated since version 3.5.
   matplotlib.sphinxext.plot_directive.unescape_doctest(text)[source]

[Deprecated] Extract code from a piece of text, which contains either Python code or doctests. Notes  Deprecated since version 3.5.


matplotlib.sphinxext.plot_directive.mark_plot_labels(app, document)[source]

To make plots referenceable, we need to move the reference from the "htmlonly" (or "latexonly") node to the actual figure node itself.


matplotlib.sphinxext.plot_directive.out_of_date(original, derived, includes=None)[source]

Return whether derived is out-of-date relative to original or any of the RST files included in it using the RST include directive (includes). derived and original are full paths, and includes is optionally a list of full paths which may have been included in the original.


classmatplotlib.sphinxext.plot_directive.PlotDirective(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)[source]

The .. plot:: directive, as documented in the module's docstring.   run()[source]

Run the plot directive.


matplotlib.sphinxext.plot_directive.render_figures(code, code_path, output_dir, output_base, context, function_name, config, context_reset=False, close_figs=False, code_includes=None)[source]

Run a pyplot script and save the images in output_dir. Save the images under output_dir with file names derived from output_base


matplotlib.sphinxext.plot_directive.run_code(code, code_path, ns=None, function_name=None)[source]

[Deprecated] Import a Python module from a path, and run the function given by name, if function_name is not None. Notes  Deprecated since version 3.5.


matplotlib.sphinxext.plot_directive.split_code_at_show(text)[source]

[Deprecated] Split code at plt.show(). Notes  Deprecated since version 3.5.


matplotlib.sphinxext.plot_directive.unescape_doctest(text)[source]

[Deprecated] Extract code from a piece of text, which contains either Python code or doctests. Notes  Deprecated since version 3.5.


matplotlib.spines   classmatplotlib.spines.Spine(axes, spine_type, path, **kwargs)[source]

Bases: matplotlib.patches.Patch An axis spine -- the line noting the data area boundaries. Spines are the lines connecting the axis tick marks and noting the boundaries of the data area. They can be placed at arbitrary positions. See set_position for more information. The default position is ('outward', 0). Spines are subclasses of Patch, and inherit much of their behavior. Spines draw a line, a circle, or an arc depending if set_patch_line, set_patch_circle, or set_patch_arc has been called. Line-like is the default.  Parameters

axesAxes

The Axes instance containing the spine.
spine_typestr

The spine type.
pathPath

The Path instance used to draw the spine.    Other Parameters
 **kwargs

Valid keyword arguments 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 unknown
animated bool
antialiased or aa bool or None
capstyle CapStyle or {'butt', 'projecting', 'round'}
clip_box Bbox
clip_on bool
clip_path Patch or (Path, Transform) or None
color color
edgecolor or ec color or None
facecolor or fc color or None
figure Figure
fill bool
gid str
hatch {'/', '\', '|', '-', '+', 'x', 'o', 'O', '.', '*'}
in_layout bool
joinstyle JoinStyle or {'miter', 'round', 'bevel'}
label object
linestyle or ls {'-', '--', '-.', ':', '', (offset, on-off-seq), ...}
linewidth or lw float or None
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         classmethodarc_spine(axes, spine_type, center, radius, theta1, theta2, **kwargs)[source]

Create and return an arc Spine.
   classmethodcircular_spine(axes, center, radius, **kwargs)[source]

Create and return a circular Spine.
   cla()[source]

[Deprecated] Notes  Deprecated since version 3.4:
   clear()[source]

Clear the current spine.
   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_bounds()[source]

Get the bounds of the spine.
   get_patch_transform()[source]

Return the Transform instance mapping patch coordinates to data coordinates. For example, one may define a patch of a circle which represents a radius of 5 by providing coordinates for a unit circle, and a transform which scales the coordinates (the patch coordinate) by 5.
   get_path()[source]

Return the path of this patch.
   get_position()[source]

Return the spine position.
   get_spine_transform()[source]

Return the spine transform.
   get_window_extent(renderer=None)[source]

Return the window extent of the spines in display space, including padding for ticks (but not their labels)  See also  matplotlib.axes.Axes.get_tightbbox
matplotlib.axes.Axes.get_window_extent

   classmethodlinear_spine(axes, spine_type, **kwargs)[source]

Create and return a linear Spine.
   register_axis(axis)[source]

Register an axis. An axis should be registered with its corresponding spine from the Axes instance. This allows the spine to clear any axis properties when needed.
   set(*, agg_filter=<UNSET>, alpha=<UNSET>, animated=<UNSET>, antialiased=<UNSET>, bounds=<UNSET>, capstyle=<UNSET>, clip_box=<UNSET>, clip_on=<UNSET>, clip_path=<UNSET>, color=<UNSET>, edgecolor=<UNSET>, facecolor=<UNSET>, fill=<UNSET>, gid=<UNSET>, hatch=<UNSET>, in_layout=<UNSET>, joinstyle=<UNSET>, label=<UNSET>, linestyle=<UNSET>, linewidth=<UNSET>, patch_arc=<UNSET>, patch_circle=<UNSET>, path_effects=<UNSET>, picker=<UNSET>, position=<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
antialiased or aa bool or None
bounds (low: float, high: float)
capstyle CapStyle or {'butt', 'projecting', 'round'}
clip_box Bbox
clip_on bool
clip_path Patch or (Path, Transform) or None
color color
edgecolor or ec color or None
facecolor or fc color or None
figure Figure
fill bool
gid str
hatch {'/', '\', '|', '-', '+', 'x', 'o', 'O', '.', '*'}
in_layout bool
joinstyle JoinStyle or {'miter', 'round', 'bevel'}
label object
linestyle or ls {'-', '--', '-.', ':', '', (offset, on-off-seq), ...}
linewidth or lw float or None
patch_arc unknown
patch_circle unknown
path_effects AbstractPathEffect
picker None or bool or float or callable
position unknown
rasterized bool
sketch_params (scale: float, length: float, randomness: float)
snap bool or None
transform Transform
url str
visible bool
zorder float
   set_bounds(low=None, high=None)[source]

Set the spine bounds.  Parameters

lowfloat or None, optional

The lower spine bound. Passing None leaves the limit unchanged. The bounds may also be passed as the tuple (low, high) as the first positional argument.
highfloat or None, optional

The higher spine bound. Passing None leaves the limit unchanged.
   set_color(c)[source]

Set the edgecolor.  Parameters

ccolor

   Notes This method does not modify the facecolor (which defaults to "none"), unlike the Patch.set_color method defined in the parent class. Use Patch.set_facecolor to set the facecolor.
   set_patch_arc(center, radius, theta1, theta2)[source]

Set the spine to be arc-like.
   set_patch_circle(center, radius)[source]

Set the spine to be circular.
   set_patch_line()[source]

Set the spine to be linear.
   set_position(position)[source]

Set the position of the spine. Spine position is specified by a 2 tuple of (position type, amount). The position types are:  'outward': place the spine out from the data area by the specified number of points. (Negative values place the spine inwards.) 'axes': place the spine at the specified Axes coordinate (0 to 1). 'data': place the spine at the specified data coordinate.  Additionally, shorthand notations define a special positions:  'center' -> ('axes', 0.5) 'zero' -> ('data', 0.0)

   classmatplotlib.spines.Spines(**kwargs)[source]

Bases: collections.abc.MutableMapping The container of all Spines in an Axes. The interface is dict-like mapping names (e.g. 'left') to Spine objects. Additionally it implements some pandas.Series-like features like accessing elements by attribute: spines['top'].set_visible(False)
spines.top.set_visible(False)
 Multiple spines can be addressed simultaneously by passing a list: spines[['top', 'right']].set_visible(False)
 Use an open slice to address all spines: spines[:].set_visible(False)
 The latter two indexing methods will return a SpinesProxy that broadcasts all set_* calls to its members, but cannot be used for any other operation.   classmethodfrom_dict(d)[source]

   classmatplotlib.spines.SpinesProxy(spine_dict)[source]

Bases: object A proxy to broadcast set_* method calls to all contained Spines. The proxy cannot be used for any other operations on its members. The supported methods are determined dynamically based on the contained spines. If not all spines support a given method, it's executed only on the subset of spines that support it.


classmatplotlib.spines.Spine(axes, spine_type, path, **kwargs)[source]

Bases: matplotlib.patches.Patch An axis spine -- the line noting the data area boundaries. Spines are the lines connecting the axis tick marks and noting the boundaries of the data area. They can be placed at arbitrary positions. See set_position for more information. The default position is ('outward', 0). Spines are subclasses of Patch, and inherit much of their behavior. Spines draw a line, a circle, or an arc depending if set_patch_line, set_patch_circle, or set_patch_arc has been called. Line-like is the default.  Parameters

axesAxes

The Axes instance containing the spine.
spine_typestr

The spine type.
pathPath

The Path instance used to draw the spine.    Other Parameters
 **kwargs

Valid keyword arguments 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 unknown
animated bool
antialiased or aa bool or None
capstyle CapStyle or {'butt', 'projecting', 'round'}
clip_box Bbox
clip_on bool
clip_path Patch or (Path, Transform) or None
color color
edgecolor or ec color or None
facecolor or fc color or None
figure Figure
fill bool
gid str
hatch {'/', '\', '|', '-', '+', 'x', 'o', 'O', '.', '*'}
in_layout bool
joinstyle JoinStyle or {'miter', 'round', 'bevel'}
label object
linestyle or ls {'-', '--', '-.', ':', '', (offset, on-off-seq), ...}
linewidth or lw float or None
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         classmethodarc_spine(axes, spine_type, center, radius, theta1, theta2, **kwargs)[source]

Create and return an arc Spine.
   classmethodcircular_spine(axes, center, radius, **kwargs)[source]

Create and return a circular Spine.
   cla()[source]

[Deprecated] Notes  Deprecated since version 3.4:
   clear()[source]

Clear the current spine.
   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_bounds()[source]

Get the bounds of the spine.
   get_patch_transform()[source]

Return the Transform instance mapping patch coordinates to data coordinates. For example, one may define a patch of a circle which represents a radius of 5 by providing coordinates for a unit circle, and a transform which scales the coordinates (the patch coordinate) by 5.
   get_path()[source]

Return the path of this patch.
   get_position()[source]

Return the spine position.
   get_spine_transform()[source]

Return the spine transform.
   get_window_extent(renderer=None)[source]

Return the window extent of the spines in display space, including padding for ticks (but not their labels)  See also  matplotlib.axes.Axes.get_tightbbox
matplotlib.axes.Axes.get_window_extent

   classmethodlinear_spine(axes, spine_type, **kwargs)[source]

Create and return a linear Spine.
   register_axis(axis)[source]

Register an axis. An axis should be registered with its corresponding spine from the Axes instance. This allows the spine to clear any axis properties when needed.
   set(*, agg_filter=<UNSET>, alpha=<UNSET>, animated=<UNSET>, antialiased=<UNSET>, bounds=<UNSET>, capstyle=<UNSET>, clip_box=<UNSET>, clip_on=<UNSET>, clip_path=<UNSET>, color=<UNSET>, edgecolor=<UNSET>, facecolor=<UNSET>, fill=<UNSET>, gid=<UNSET>, hatch=<UNSET>, in_layout=<UNSET>, joinstyle=<UNSET>, label=<UNSET>, linestyle=<UNSET>, linewidth=<UNSET>, patch_arc=<UNSET>, patch_circle=<UNSET>, path_effects=<UNSET>, picker=<UNSET>, position=<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
antialiased or aa bool or None
bounds (low: float, high: float)
capstyle CapStyle or {'butt', 'projecting', 'round'}
clip_box Bbox
clip_on bool
clip_path Patch or (Path, Transform) or None
color color
edgecolor or ec color or None
facecolor or fc color or None
figure Figure
fill bool
gid str
hatch {'/', '\', '|', '-', '+', 'x', 'o', 'O', '.', '*'}
in_layout bool
joinstyle JoinStyle or {'miter', 'round', 'bevel'}
label object
linestyle or ls {'-', '--', '-.', ':', '', (offset, on-off-seq), ...}
linewidth or lw float or None
patch_arc unknown
patch_circle unknown
path_effects AbstractPathEffect
picker None or bool or float or callable
position unknown
rasterized bool
sketch_params (scale: float, length: float, randomness: float)
snap bool or None
transform Transform
url str
visible bool
zorder float
   set_bounds(low=None, high=None)[source]

Set the spine bounds.  Parameters

lowfloat or None, optional

The lower spine bound. Passing None leaves the limit unchanged. The bounds may also be passed as the tuple (low, high) as the first positional argument.
highfloat or None, optional

The higher spine bound. Passing None leaves the limit unchanged.
   set_color(c)[source]

Set the edgecolor.  Parameters

ccolor

   Notes This method does not modify the facecolor (which defaults to "none"), unlike the Patch.set_color method defined in the parent class. Use Patch.set_facecolor to set the facecolor.
   set_patch_arc(center, radius, theta1, theta2)[source]

Set the spine to be arc-like.
   set_patch_circle(center, radius)[source]

Set the spine to be circular.
   set_patch_line()[source]

Set the spine to be linear.
   set_position(position)[source]

Set the position of the spine. Spine position is specified by a 2 tuple of (position type, amount). The position types are:  'outward': place the spine out from the data area by the specified number of points. (Negative values place the spine inwards.) 'axes': place the spine at the specified Axes coordinate (0 to 1). 'data': place the spine at the specified data coordinate.  Additionally, shorthand notations define a special positions:  'center' -> ('axes', 0.5) 'zero' -> ('data', 0.0)


classmethodarc_spine(axes, spine_type, center, radius, theta1, theta2, **kwargs)[source]

Create and return an arc Spine.


classmethodcircular_spine(axes, center, radius, **kwargs)[source]

Create and return a circular Spine.


cla()[source]

[Deprecated] Notes  Deprecated since version 3.4:


clear()[source]

Clear the current spine.