You are reading an old version of the documentation (v3.0.0). For the latest version see https://matplotlib.org/stable/api/_as_gen/mpl_toolkits.axisartist.axislines.Axes.html
Version 3.0.0
matplotlib
Fork me on GitHub

mpl_toolkits.axisartist.axislines.Axes

class mpl_toolkits.axisartist.axislines.Axes(*args, grid_helper=None, **kwargs)[source]

Bases: matplotlib.axes._axes.Axes

class AxisDict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object's (key, value) pairs dict(iterable) -> new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(**kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1, two=2)[source]

Bases: dict

axis

Convenience method to get or set some axis properties.

Call signatures:

xmin, xmax, ymin, ymax = axis()
xmin, xmax, ymin, ymax = axis(list_arg)
xmin, xmax, ymin, ymax = axis(string_arg)
xmin, xmax, ymin, ymax = axis(**kwargs)
Parameters:
v : List[float] or one of the strings listed below.

Optional positional-only argument

If a list, set the axis data limits. If a string:

Value Description
'on' Turn on axis lines and labels.
'off' Turn off axis lines and labels.
'equal' Set equal scaling (i.e., make circles circular) by changing axis limits.
'scaled' Set equal scaling (i.e., make circles circular) by changing dimensions of the plot box.
'tight' Set limits just large enough to show all data.
'auto' Automatic scaling (fill plot box with data).
'normal' Same as 'auto'; deprecated.
'image' 'scaled' with axis limits equal to data limits.
'square' Square plot; similar to 'scaled', but initially forcing xmax-xmin = ymax-ymin.
emit : bool, optional

Passed to set_{x,y}lim functions, if observers are notified of axis limit change.

xmin, ymin, xmax, ymax : float, optional

The axis limits to be set.

Returns:
xmin, xmax, ymin, ymax : float

The axis limits.

cla()[source]

Clear the current axes.

draw(renderer, inframe=False)[source]

Draw everything (plot lines, axes, labels)

get_children()[source]

return a list of child artists

get_grid_helper()[source]
get_tightbbox(renderer, call_axes_locator=True)[source]

Return the tight bounding box of the axes, including axis and their decorators (xlabel, title, etc).

Artists that have artist.set_in_layout(False) are not included in the bbox.

Parameters:
renderer : RendererBase instance

renderer that will be used to draw the figures (i.e. fig.canvas.get_renderer())

bbox_extra_artists : list of Artist or None

List of artists to include in the tight bounding box. If None (default), then all artist children of the axes are included in the tight bounding box.

call_axes_locator : boolean (default True)

If call_axes_locator is False, it does not call the _axes_locator attribute, which is necessary to get the correct bounding box. call_axes_locator=False can be used if the caller is only interested in the relative size of the tightbbox compared to the axes bbox.

Returns:
bbox : BboxBase

bounding box in figure pixel coordinates.

grid(b=None, which='major', axis='both', **kwargs)[source]

Toggle the gridlines, and optionally set the properties of the lines.

invalidate_grid_helper()[source]
new_fixed_axis(loc, offset=None)[source]
new_floating_axis(nth_coord, value, axis_direction='bottom')[source]
new_gridlines(grid_helper=None)[source]

Create and return a new GridlineCollection instance.

which : "major" or "minor" axis : "both", "x" or "y"

toggle_axisline(b=None)[source]