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

Bases: matplotlib.axes._axes.Axes

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

  • 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.

  • *args, **kwargs – Passed to Axes.

Attributes Summary


The axes number.

Methods Summary

area(*args, **kwargs)

Alias for fill_between.

areax(*args, **kwargs)

Alias for fill_betweenx.

boxes(*args, **kwargs)

Alias for boxplot.

colorbar(*args[, loc, pad, length, width, …])

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


Perform post-processing steps then draw the axes.

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

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


Return the width and the height of the axes in inches.

get_tightbbox(renderer, *args, **kwargs)

Perform post-processing steps, return the tight bounding box surrounding axes artists, and cache the bounding box as an attribute.

heatmap(*args, **kwargs)

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

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

Draw lines indicating the zoom range of the inset axes.

inset(bounds, *[, transform, zorder, zoom, …])

Alias for inset_axes.

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

Return an inset CartesianAxes.

legend(*args[, loc, width, space])

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

panel(side, **kwargs)

Alias for panel_axes.

panel_axes(side, **kwargs)

Return a panel axes drawn along the edge of this axes.

parametric(*args[, values, cmap, norm, interp])

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

violins(*args, **kwargs)

Alias for violinplot.