Axes

class Axes(*args, number=None, main=False, _subplotspec=None, **kwargs)[source]

Bases: matplotlib.axes._axes.Axes

Lowest-level axes subclass. Handles titles and axis sharing. Adds several new methods and overrides existing ones.

Parameters
  • number (int) – The subplot number, used for a-b-c labeling. See format for details. Note the first axes is 1, not 0.

  • main (bool, optional) – Used internally, indicates whether this is a “main axes” rather than a twin, panel, or inset axes.

Other Parameters

*args, **kwargs – Passed to Axes.

Attributes Summary

number

The axes number.

Methods Summary

area(*args, **kwargs)

Shorthand for fill_between.

areax(*args, **kwargs)

Shorthand for fill_betweenx.

boxes(*args, **kwargs)

Shorthand for boxplot.

colorbar(mappable[, values, loc, length, …])

Add an inset colorbar or outer colorbar along the outside edge of the axes.

format(*[, title, figtitle, suptitle, …])

Modify the axes title(s), the a-b-c label, row and column labels, and the figure title.

heatmap(*args[, aspect])

Pass all arguments to pcolormesh then apply settings that are suitable for heatmaps: square grid boxes by default, major ticks at the center of each grid box, no minor ticks, and no gridlines.

indicate_inset_zoom([alpha, lw, linewidth, …])

Draw lines indicating the zoom range of the inset axes.

inset(*args, **kwargs)

Return an inset CartesianAxes.

inset_axes(bounds[, transform, zorder, …])

Return an inset CartesianAxes.

legend([handles, labels, loc, width, space, …])

Add an inset legend or outer legend along the edge of the axes.

panel(side, **kwargs)

Return a panel drawn along the edge of this axes.

panel_axes(side, **kwargs)

Return a panel drawn along the edge of this axes.

parametric(x, y[, values, cmap, norm, …])

Draw a line whose color changes as a function of the parametric coordinate values using the input colormap cmap.

plotx(*args, **kwargs)

As with plot but interpret a single positional argument as x and multiple positional arguments as y and x (in that order).

scatterx(*args, **kwargs)

As with scatter but interpret a single positional argument as x and multiple positional arguments as y and x (in that order).

violins(*args, **kwargs)

Shorthand for violinplot.