You are reading an old version of the documentation (v2.2.3). For the latest version see
Version 2.2.3
Fork me on GitHub


class mpl_toolkits.axisartist.axislines.Axes(*kl, **kw)[source]
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]

Set axis properties.

Valid 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)
v : list of float or {'on', 'off', 'equal', 'tight', 'scaled', 'normal', 'auto', 'image', 'square'}

Optional positional argument

Axis data limits set from a list; or a command relating to axes:

Value Description
'on' Toggle axis lines and labels on
'off' Toggle axis lines and labels off
'equal' Equal scaling by changing limits
'scaled' Equal scaling by changing box dimensions
'tight' Limits set such that all data is shown
'auto' Automatic scaling, fill rectangle 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

xmin, xmax, ymin, ymax : float

The axis limits


Clear the current axes.

draw(renderer, inframe=False)[source]

Draw everything (plot lines, axes, labels)


return a list of child artists

get_tightbbox(renderer, call_axes_locator=True)[source]

Return the tight bounding box of the axes. The dimension of the Bbox in canvas coordinate.

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 intereted in the relative size of the tightbbox compared to the axes bbox.

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

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

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

Create and return a new GridlineCollection instance.

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