Table of Contents
Classes for the ticks and x and y axis.
Axis
objectsBase class for XAxis
and YAxis
.
axes
matplotlib.axes.Axes
The Axes
instance the artist resides in, or None.
matplotlib.axis.Ticker
Determines the major tick positions and their label format.
matplotlib.axis.Ticker
Determines the minor tick positions and their label format.
matplotlib.cbook.CallbackRegistry
Text
The axis label.
The distance between the axis label and the tick labels. Defaults to rcParams["axes.labelpad"]
(default: 4.0
) = 4.
Text
A Text
object containing the data offset of the ticks (if any).
The acceptance radius for containment tests. See also Axis.contains
.
Tick
The major ticks.
Tick
The minor ticks.
matplotlib.axes.Axes
The Axes
to which the created Axis belongs.
The acceptance radius for containment tests. See also Axis.contains
.
matplotlib.axes.Axes
The Axes
to which the created Axis belongs.
The acceptance radius for containment tests. See also Axis.contains
.
matplotlib.axes.Axes
The Axes
to which the created Axis belongs.
The acceptance radius for containment tests. See also Axis.contains
.
A container for the objects defining tick position and format.
matplotlib.ticker.Locator
subclass
Determines the positions of the ticks.
matplotlib.ticker.Formatter
subclass
Determines the format of the tick labels.
Clear the axis. | |
[Deprecated] Clear this axis. | |
Return this Axis' scale (as a str). |
Get the formatter of the major ticker. | |
Get the locator of the major ticker. | |
Get the formatter of the minor ticker. | |
Get the locator of the minor ticker. | |
Set the formatter of the major ticker. | |
Set the locator of the major ticker. | |
Set the formatter of the minor ticker. | |
Set the locator of the minor ticker. | |
If minor ticker locations that overlap with major ticker locations should be trimmed. | |
Set the coordinates of the label. | |
Set the label position (top or bottom) | |
Set the text value of the axis label. | |
Return the axis label as a Text instance. | |
Return the label position (top or bottom) | |
Get the text of the label. |
Return the list of major | |
Return this Axis' major tick labels, as a list of | |
Return this Axis' major tick lines as a list of | |
Return this Axis' major tick locations in data coordinates. | |
Return the list of minor | |
Return this Axis' minor tick labels, as a list of | |
Return this Axis' minor tick lines as a list of | |
Return this Axis' minor tick locations in data coordinates. | |
Return the axis offsetText as a Text instance. | |
Get this Axis' tick labels. | |
Return this Axis' tick lines as a list of | |
Return this Axis' tick locations in data coordinates. | |
Return this Axis' grid lines as a list of | |
Configure the grid lines. | |
Set appearance parameters for ticks, ticklabels, and gridlines. | |
Set up axis ticks and labels to treat data along this Axis as dates. |
Return the | |
Return the | |
Return whether this Axis is oriented in the "inverse" direction. | |
Set the axis data limits. | |
Set the axis view limits. | |
Set whether this Axis is oriented in the "inverse" direction. |
Return the estimated number of ticks that can fit on the axis. | |
Get the extents of the tick labels on either side of the axes. | |
Return a bounding box that encloses the axis. |
Test whether the artist contains the mouse event. | |
Return the depth of the axis used by the picker. | |
Set the depth of the axis used by the picker. |
Set the units for axis. | |
Return the units for axis. | |
Introspect data for units converter and update the axis.converter instance if necessary. |
Read-only name identifying the axis. | |
Return how much space should be reserved for text above and below the axes, as a pair of floats. | |
Return the ticks position ("top", "bottom", "default", or "unknown"). | |
Set the ticks position. | |
Set the label position (top or bottom) | |
Move ticks and ticklabels (if present) to the bottom of the axes. | |
Move ticks and ticklabels (if present) to the top of the axes. |
Read-only name identifying the axis. | |
Return the ticks position ("left", "right", "default", or "unknown"). | |
| |
Set the ticks position. | |
Set the label position (left or right) | |
Move ticks and ticklabels (if present) to the left of the axes. | |
Move ticks and ticklabels (if present) to the right of the axes. |
The | |
Re-initialize the major and minor Tick lists. | |
Set the default limits for the axis data and view interval if they have not been not mutated yet. |
These methods should be used together with care, calling set_ticks
to specify the desired tick locations before calling set_ticklabels
to specify a matching series of labels. Calling set_ticks
makes a FixedLocator
; it's list of locations is then used by set_ticklabels
to make an appropriate FuncFormatter
.
Set this Axis' tick locations and optionally labels. | |
Set the text values of the tick labels. |
Tick
objectsAbstract base class for the axis ticks, grid lines and labels.
Ticks mark a position on an Axis. They contain two lines as markers and two labels; one each for the bottom and top positions (in case of an XAxis
) or for the left and right positions (in case of a YAxis
).
bbox is the Bound2D bounding box in display coords of the Axes loc is the tick location in data coords size is the tick size in points
Contains all the Artists needed to make an x tick - the tick line, the label text and the grid line
bbox is the Bound2D bounding box in display coords of the Axes loc is the tick location in data coords size is the tick size in points
Contains all the Artists needed to make a Y tick - the tick line, the label text and the grid line
bbox is the Bound2D bounding box in display coords of the Axes loc is the tick location in data coords size is the tick size in points
Return the tick location (data coords) as a scalar. | |
Get the value of the tick label pad in points. | |
Get the length of the tick outside of the axes. | |
Return the view limits | |
Set the label1 text. | |
Set the label2 text. | |
Set the tick label pad in points | |
Set the url of label1 and label2. | |
Set the location of tick in data coords with scalar loc. |
© 2012–2021 Matplotlib Development Team. All rights reserved.
Licensed under the Matplotlib License Agreement.
https://matplotlib.org/3.5.1/api/axis_api.html