doc_content
stringlengths
1
386k
doc_id
stringlengths
5
188
get_images_artists()[source] [Deprecated] Notes Deprecated since version 3.5:
matplotlib._as_gen.mpl_toolkits.axes_grid1.parasite_axes.parasiteaxesbase#mpl_toolkits.axes_grid1.parasite_axes.ParasiteAxesBase.get_images_artists
get_viewlim_mode()[source]
matplotlib._as_gen.mpl_toolkits.axes_grid1.parasite_axes.parasiteaxesbase#mpl_toolkits.axes_grid1.parasite_axes.ParasiteAxesBase.get_viewlim_mode
pick(mouseevent)[source]
matplotlib._as_gen.mpl_toolkits.axes_grid1.parasite_axes.parasiteaxesbase#mpl_toolkits.axes_grid1.parasite_axes.ParasiteAxesBase.pick
set_viewlim_mode(mode)[source]
matplotlib._as_gen.mpl_toolkits.axes_grid1.parasite_axes.parasiteaxesbase#mpl_toolkits.axes_grid1.parasite_axes.ParasiteAxesBase.set_viewlim_mode
update_viewlim()[source] [Deprecated] Notes Deprecated since version 3.4:
matplotlib._as_gen.mpl_toolkits.axes_grid1.parasite_axes.parasiteaxesbase#mpl_toolkits.axes_grid1.parasite_axes.ParasiteAxesBase.update_viewlim
matplotlib.axis Table of Contents Inheritance Axis objects Formatters and Locators Axis Label Ticks, tick labels and Offset text Data and view intervals Rendering helpers Interactive Units XAxis Specific YAxis Specific Other Discouraged Tick objects Classes for the ticks and x and y axis. Inheritance Axis objects classmatplotlib.axis.Axis(axes, pickradius=15)[source] Base class for XAxis and YAxis. Attributes isDefault_labelbool axesmatplotlib.axes.Axes The Axes instance the artist resides in, or None. majormatplotlib.axis.Ticker Determines the major tick positions and their label format. minormatplotlib.axis.Ticker Determines the minor tick positions and their label format. callbacksmatplotlib.cbook.CallbackRegistry labelText The axis label. labelpadfloat The distance between the axis label and the tick labels. Defaults to rcParams["axes.labelpad"] (default: 4.0) = 4. offsetTextText A Text object containing the data offset of the ticks (if any). pickradiusfloat The acceptance radius for containment tests. See also Axis.contains. majorTickslist of Tick The major ticks. minorTickslist of Tick The minor ticks. Parameters axesmatplotlib.axes.Axes The Axes to which the created Axis belongs. pickradiusfloat The acceptance radius for containment tests. See also Axis.contains. classmatplotlib.axis.XAxis(*args, **kwargs)[source] Parameters axesmatplotlib.axes.Axes The Axes to which the created Axis belongs. pickradiusfloat The acceptance radius for containment tests. See also Axis.contains. classmatplotlib.axis.YAxis(*args, **kwargs)[source] Parameters axesmatplotlib.axes.Axes The Axes to which the created Axis belongs. pickradiusfloat The acceptance radius for containment tests. See also Axis.contains. classmatplotlib.axis.Ticker[source] A container for the objects defining tick position and format. Attributes locatormatplotlib.ticker.Locator subclass Determines the positions of the ticks. formattermatplotlib.ticker.Formatter subclass Determines the format of the tick labels. Axis.clear Clear the axis. Axis.cla [Deprecated] Clear this axis. Axis.get_scale Return this Axis' scale (as a str). Formatters and Locators Axis.get_major_formatter Get the formatter of the major ticker. Axis.get_major_locator Get the locator of the major ticker. Axis.get_minor_formatter Get the formatter of the minor ticker. Axis.get_minor_locator Get the locator of the minor ticker. Axis.set_major_formatter Set the formatter of the major ticker. Axis.set_major_locator Set the locator of the major ticker. Axis.set_minor_formatter Set the formatter of the minor ticker. Axis.set_minor_locator Set the locator of the minor ticker. Axis.remove_overlapping_locs If minor ticker locations that overlap with major ticker locations should be trimmed. Axis.get_remove_overlapping_locs Axis.set_remove_overlapping_locs Axis Label Axis.set_label_coords Set the coordinates of the label. Axis.set_label_position Set the label position (top or bottom) Axis.set_label_text Set the text value of the axis label. Axis.get_label Return the axis label as a Text instance. Axis.get_label_position Return the label position (top or bottom) Axis.get_label_text Get the text of the label. Ticks, tick labels and Offset text Axis.get_major_ticks Return the list of major Ticks. Axis.get_majorticklabels Return this Axis' major tick labels, as a list of Text. Axis.get_majorticklines Return this Axis' major tick lines as a list of Line2Ds. Axis.get_majorticklocs Return this Axis' major tick locations in data coordinates. Axis.get_minor_ticks Return the list of minor Ticks. Axis.get_minorticklabels Return this Axis' minor tick labels, as a list of Text. Axis.get_minorticklines Return this Axis' minor tick lines as a list of Line2Ds. Axis.get_minorticklocs Return this Axis' minor tick locations in data coordinates. Axis.get_offset_text Return the axis offsetText as a Text instance. Axis.get_tick_padding Axis.get_ticklabels Get this Axis' tick labels. Axis.get_ticklines Return this Axis' tick lines as a list of Line2Ds. Axis.get_ticklocs Return this Axis' tick locations in data coordinates. Axis.get_gridlines Return this Axis' grid lines as a list of Line2Ds. Axis.grid Configure the grid lines. Axis.set_tick_params Set appearance parameters for ticks, ticklabels, and gridlines. Axis.axis_date Set up axis ticks and labels to treat data along this Axis as dates. Data and view intervals Axis.get_data_interval Return the (min, max) data limits of this axis. Axis.get_view_interval Return the (min, max) view limits of this axis. Axis.get_inverted Return whether this Axis is oriented in the "inverse" direction. Axis.set_data_interval Set the axis data limits. Axis.set_view_interval Set the axis view limits. Axis.set_inverted Set whether this Axis is oriented in the "inverse" direction. Rendering helpers Axis.get_minpos Axis.get_tick_space Return the estimated number of ticks that can fit on the axis. Axis.get_ticklabel_extents Get the extents of the tick labels on either side of the axes. Axis.get_tightbbox Return a bounding box that encloses the axis. Interactive Axis.contains Test whether the artist contains the mouse event. Axis.get_pickradius Return the depth of the axis used by the picker. Axis.set_pickradius Set the depth of the axis used by the picker. Units Axis.convert_units Axis.set_units Set the units for axis. Axis.get_units Return the units for axis. Axis.update_units Introspect data for units converter and update the axis.converter instance if necessary. XAxis Specific XAxis.axis_name Read-only name identifying the axis. XAxis.get_text_heights Return how much space should be reserved for text above and below the axes, as a pair of floats. XAxis.get_ticks_position Return the ticks position ("top", "bottom", "default", or "unknown"). XAxis.set_ticks_position Set the ticks position. XAxis.set_label_position Set the label position (top or bottom) XAxis.tick_bottom Move ticks and ticklabels (if present) to the bottom of the axes. XAxis.tick_top Move ticks and ticklabels (if present) to the top of the axes. YAxis Specific YAxis.axis_name Read-only name identifying the axis. YAxis.get_text_widths YAxis.get_ticks_position Return the ticks position ("left", "right", "default", or "unknown"). YAxis.set_offset_position Parameters YAxis.set_ticks_position Set the ticks position. YAxis.set_label_position Set the label position (left or right) YAxis.tick_left Move ticks and ticklabels (if present) to the left of the axes. YAxis.tick_right Move ticks and ticklabels (if present) to the right of the axes. Other Axis.OFFSETTEXTPAD Axis.axes The Axes instance the artist resides in, or None. Axis.limit_range_for_scale Axis.reset_ticks Re-initialize the major and minor Tick lists. Axis.set_default_intervals Set the default limits for the axis data and view interval if they have not been not mutated yet. Discouraged 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. Axis.set_ticks Set this Axis' tick locations and optionally labels. Axis.set_ticklabels Set the text values of the tick labels. Tick objects classmatplotlib.axis.Tick(axes, loc, *, size=None, width=None, color=None, tickdir=None, pad=None, labelsize=None, labelcolor=None, zorder=None, gridOn=None, tick1On=True, tick2On=True, label1On=True, label2On=False, major=True, labelrotation=0, grid_color=None, grid_linestyle=None, grid_linewidth=None, grid_alpha=None, **kw)[source] Abstract 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). Attributes tick1lineLine2D The left/bottom tick marker. tick2lineLine2D The right/top tick marker. gridlineLine2D The grid line associated with the label position. label1Text The left/bottom tick label. label2Text The right/top tick label. 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 classmatplotlib.axis.XTick(*args, **kwargs)[source] 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 classmatplotlib.axis.YTick(*args, **kwargs)[source] 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 Tick.get_loc Return the tick location (data coords) as a scalar. Tick.get_pad Get the value of the tick label pad in points. Tick.get_pad_pixels Tick.get_tick_padding Get the length of the tick outside of the axes. Tick.get_tickdir Tick.get_view_interval Return the view limits (min, max) of the axis the tick belongs to. Tick.set_label1 Set the label1 text. Tick.set_label2 Set the label2 text. Tick.set_pad Set the tick label pad in points Tick.set_url Set the url of label1 and label2. Tick.update_position Set the location of tick in data coords with scalar loc.
matplotlib.axis_api
classmatplotlib.axis.Axis(axes, pickradius=15)[source] Base class for XAxis and YAxis. Attributes isDefault_labelbool axesmatplotlib.axes.Axes The Axes instance the artist resides in, or None. majormatplotlib.axis.Ticker Determines the major tick positions and their label format. minormatplotlib.axis.Ticker Determines the minor tick positions and their label format. callbacksmatplotlib.cbook.CallbackRegistry labelText The axis label. labelpadfloat The distance between the axis label and the tick labels. Defaults to rcParams["axes.labelpad"] (default: 4.0) = 4. offsetTextText A Text object containing the data offset of the ticks (if any). pickradiusfloat The acceptance radius for containment tests. See also Axis.contains. majorTickslist of Tick The major ticks. minorTickslist of Tick The minor ticks. Parameters axesmatplotlib.axes.Axes The Axes to which the created Axis belongs. pickradiusfloat The acceptance radius for containment tests. See also Axis.contains.
matplotlib.axis_api#matplotlib.axis.Axis
matplotlib.axis.Axis.axes propertyAxis.axes The Axes instance the artist resides in, or None.
matplotlib._as_gen.matplotlib.axis.axis.axes
matplotlib.axis.Axis.axis_date Axis.axis_date(tz=None)[source] Set up axis ticks and labels to treat data along this Axis as dates. Parameters tzstr or datetime.tzinfo, default: rcParams["timezone"] (default: 'UTC') The timezone used to create date labels.
matplotlib._as_gen.matplotlib.axis.axis.axis_date
matplotlib.axis.Axis.cla Axis.cla()[source] [Deprecated] Clear this axis. Notes Deprecated since version 3.4.
matplotlib._as_gen.matplotlib.axis.axis.cla
matplotlib.axis.Axis.clear Axis.clear()[source] Clear the axis. This resets axis properties to their default values: the label the scale locators, formatters and ticks major and minor grid units registered callbacks
matplotlib._as_gen.matplotlib.axis.axis.clear
matplotlib.axis.Axis.contains Axis.contains(mouseevent)[source] Test whether the artist contains the mouse event. Parameters mouseeventmatplotlib.backend_bases.MouseEvent Returns containsbool Whether any values are within the radius. detailsdict An artist-specific dictionary of details of the event context, such as which points are contained in the pick radius. See the individual Artist subclasses for details.
matplotlib._as_gen.matplotlib.axis.axis.contains
matplotlib.axis.Axis.convert_units Axis.convert_units(x)[source]
matplotlib._as_gen.matplotlib.axis.axis.convert_units
matplotlib.axis.Axis.get_data_interval Axis.get_data_interval()[source] Return the (min, max) data limits of this axis.
matplotlib._as_gen.matplotlib.axis.axis.get_data_interval
matplotlib.axis.Axis.get_gridlines Axis.get_gridlines()[source] Return this Axis' grid lines as a list of Line2Ds.
matplotlib._as_gen.matplotlib.axis.axis.get_gridlines
matplotlib.axis.Axis.get_inverted Axis.get_inverted()[source] Return whether this Axis is oriented in the "inverse" direction. The "normal" direction is increasing to the right for the x-axis and to the top for the y-axis; the "inverse" direction is increasing to the left for the x-axis and to the bottom for the y-axis.
matplotlib._as_gen.matplotlib.axis.axis.get_inverted
matplotlib.axis.Axis.get_label Axis.get_label()[source] Return the axis label as a Text instance. Examples using matplotlib.axis.Axis.get_label Parasite Simple
matplotlib._as_gen.matplotlib.axis.axis.get_label
matplotlib.axis.Axis.get_label_position Axis.get_label_position()[source] Return the label position (top or bottom)
matplotlib._as_gen.matplotlib.axis.axis.get_label_position
matplotlib.axis.Axis.get_label_text Axis.get_label_text()[source] Get the text of the label.
matplotlib._as_gen.matplotlib.axis.axis.get_label_text
matplotlib.axis.Axis.get_major_formatter Axis.get_major_formatter()[source] Get the formatter of the major ticker.
matplotlib._as_gen.matplotlib.axis.axis.get_major_formatter
matplotlib.axis.Axis.get_major_locator Axis.get_major_locator()[source] Get the locator of the major ticker. Examples using matplotlib.axis.Axis.get_major_locator Date tick labels Inset Locator Demo2 Basic Usage
matplotlib._as_gen.matplotlib.axis.axis.get_major_locator
matplotlib.axis.Axis.get_major_ticks Axis.get_major_ticks(numticks=None)[source] Return the list of major Ticks.
matplotlib._as_gen.matplotlib.axis.axis.get_major_ticks
matplotlib.axis.Axis.get_majorticklabels Axis.get_majorticklabels()[source] Return this Axis' major tick labels, as a list of Text.
matplotlib._as_gen.matplotlib.axis.axis.get_majorticklabels
matplotlib.axis.Axis.get_majorticklines Axis.get_majorticklines()[source] Return this Axis' major tick lines as a list of Line2Ds.
matplotlib._as_gen.matplotlib.axis.axis.get_majorticklines
matplotlib.axis.Axis.get_majorticklocs Axis.get_majorticklocs()[source] Return this Axis' major tick locations in data coordinates.
matplotlib._as_gen.matplotlib.axis.axis.get_majorticklocs
matplotlib.axis.Axis.get_minor_formatter Axis.get_minor_formatter()[source] Get the formatter of the minor ticker.
matplotlib._as_gen.matplotlib.axis.axis.get_minor_formatter
matplotlib.axis.Axis.get_minor_locator Axis.get_minor_locator()[source] Get the locator of the minor ticker.
matplotlib._as_gen.matplotlib.axis.axis.get_minor_locator
matplotlib.axis.Axis.get_minor_ticks Axis.get_minor_ticks(numticks=None)[source] Return the list of minor Ticks. Examples using matplotlib.axis.Axis.get_minor_ticks Centering labels between ticks
matplotlib._as_gen.matplotlib.axis.axis.get_minor_ticks
matplotlib.axis.Axis.get_minorticklabels Axis.get_minorticklabels()[source] Return this Axis' minor tick labels, as a list of Text.
matplotlib._as_gen.matplotlib.axis.axis.get_minorticklabels
matplotlib.axis.Axis.get_minorticklines Axis.get_minorticklines()[source] Return this Axis' minor tick lines as a list of Line2Ds.
matplotlib._as_gen.matplotlib.axis.axis.get_minorticklines
matplotlib.axis.Axis.get_minorticklocs Axis.get_minorticklocs()[source] Return this Axis' minor tick locations in data coordinates.
matplotlib._as_gen.matplotlib.axis.axis.get_minorticklocs
matplotlib.axis.Axis.get_minpos Axis.get_minpos()[source]
matplotlib._as_gen.matplotlib.axis.axis.get_minpos
matplotlib.axis.Axis.get_offset_text Axis.get_offset_text()[source] Return the axis offsetText as a Text instance.
matplotlib._as_gen.matplotlib.axis.axis.get_offset_text
matplotlib.axis.Axis.get_pickradius Axis.get_pickradius()[source] Return the depth of the axis used by the picker.
matplotlib._as_gen.matplotlib.axis.axis.get_pickradius
matplotlib.axis.Axis.get_remove_overlapping_locs Axis.get_remove_overlapping_locs()[source]
matplotlib._as_gen.matplotlib.axis.axis.get_remove_overlapping_locs
matplotlib.axis.Axis.get_scale Axis.get_scale()[source] Return this Axis' scale (as a str).
matplotlib._as_gen.matplotlib.axis.axis.get_scale
matplotlib.axis.Axis.get_tick_padding Axis.get_tick_padding()[source]
matplotlib._as_gen.matplotlib.axis.axis.get_tick_padding
matplotlib.axis.Axis.get_tick_space Axis.get_tick_space()[source] Return the estimated number of ticks that can fit on the axis.
matplotlib._as_gen.matplotlib.axis.axis.get_tick_space
matplotlib.axis.Axis.get_ticklabel_extents Axis.get_ticklabel_extents(renderer)[source] Get the extents of the tick labels on either side of the axes.
matplotlib._as_gen.matplotlib.axis.axis.get_ticklabel_extents
matplotlib.axis.Axis.get_ticklabels Axis.get_ticklabels(minor=False, which=None)[source] Get this Axis' tick labels. Parameters minorbool Whether to return the minor or the major ticklabels. whichNone, ('minor', 'major', 'both') Overrides minor. Selects which ticklabels to return Returns list of Text Notes The tick label strings are not populated until a draw method has been called. See also: draw and draw. Examples using matplotlib.axis.Axis.get_ticklabels Image Masked Fig Axes Customize Simple Artist tutorial
matplotlib._as_gen.matplotlib.axis.axis.get_ticklabels
matplotlib.axis.Axis.get_ticklines Axis.get_ticklines(minor=False)[source] Return this Axis' tick lines as a list of Line2Ds. Examples using matplotlib.axis.Axis.get_ticklines Fig Axes Customize Simple Artist tutorial
matplotlib._as_gen.matplotlib.axis.axis.get_ticklines
matplotlib.axis.Axis.get_ticklocs Axis.get_ticklocs(*, minor=False)[source] Return this Axis' tick locations in data coordinates. Examples using matplotlib.axis.Axis.get_ticklocs Artist tutorial
matplotlib._as_gen.matplotlib.axis.axis.get_ticklocs
matplotlib.axis.Axis.get_tightbbox Axis.get_tightbbox(renderer, *, for_layout_only=False)[source] Return a bounding box that encloses the axis. It only accounts tick labels, axis label, and offsetText. If for_layout_only is True, then the width of the label (if this is an x-axis) or the height of the label (if this is a y-axis) is collapsed to near zero. This allows tight/constrained_layout to ignore too-long labels when doing their layout.
matplotlib._as_gen.matplotlib.axis.axis.get_tightbbox
matplotlib.axis.Axis.get_units Axis.get_units()[source] Return the units for axis.
matplotlib._as_gen.matplotlib.axis.axis.get_units
matplotlib.axis.Axis.get_view_interval Axis.get_view_interval()[source] Return the (min, max) view limits of this axis.
matplotlib._as_gen.matplotlib.axis.axis.get_view_interval
matplotlib.axis.Axis.grid Axis.grid(visible=None, which='major', **kwargs)[source] Configure the grid lines. Parameters visiblebool or None Whether to show the grid lines. If any kwargs are supplied, it is assumed you want the grid on and visible will be set to True. If visible is None and there are no kwargs, this toggles the visibility of the lines. which{'major', 'minor', 'both'} The grid lines to apply the changes on. **kwargsLine2D properties Define the line properties of the grid, e.g.: grid(color='r', linestyle='-', linewidth=2) Examples using matplotlib.axis.Axis.grid Box plots with custom fill colors Boxplots Box plot vs. violin plot comparison Symlog Demo
matplotlib._as_gen.matplotlib.axis.axis.grid
matplotlib.axis.Axis.limit_range_for_scale Axis.limit_range_for_scale(vmin, vmax)[source]
matplotlib._as_gen.matplotlib.axis.axis.limit_range_for_scale
matplotlib.axis.Axis.OFFSETTEXTPAD Axis.OFFSETTEXTPAD=3
matplotlib._as_gen.matplotlib.axis.axis.offsettextpad
matplotlib.axis.Axis.remove_overlapping_locs propertyAxis.remove_overlapping_locs If minor ticker locations that overlap with major ticker locations should be trimmed.
matplotlib._as_gen.matplotlib.axis.axis.remove_overlapping_locs
matplotlib.axis.Axis.reset_ticks Axis.reset_ticks()[source] Re-initialize the major and minor Tick lists. Each list starts with a single fresh Tick.
matplotlib._as_gen.matplotlib.axis.axis.reset_ticks
matplotlib.axis.Axis.set_data_interval Axis.set_data_interval(vmin, vmax, ignore=False)[source] Set the axis data limits. This method is for internal use. If ignore is False (the default), this method will never reduce the preexisting data limits, only expand them if vmin or vmax are not within them. Moreover, the order of vmin and vmax does not matter; the orientation of the axis will not change. If ignore is True, the data limits will be set exactly to (vmin, vmax) in that order.
matplotlib._as_gen.matplotlib.axis.axis.set_data_interval
matplotlib.axis.Axis.set_default_intervals Axis.set_default_intervals()[source] Set the default limits for the axis data and view interval if they have not been not mutated yet.
matplotlib._as_gen.matplotlib.axis.axis.set_default_intervals
matplotlib.axis.Axis.set_inverted Axis.set_inverted(inverted)[source] Set whether this Axis is oriented in the "inverse" direction. The "normal" direction is increasing to the right for the x-axis and to the top for the y-axis; the "inverse" direction is increasing to the left for the x-axis and to the bottom for the y-axis.
matplotlib._as_gen.matplotlib.axis.axis.set_inverted
matplotlib.axis.Axis.set_label_coords Axis.set_label_coords(x, y, transform=None)[source] Set the coordinates of the label. By default, the x coordinate of the y label and the y coordinate of the x label are determined by the tick label bounding boxes, but this can lead to poor alignment of multiple labels if there are multiple axes. You can also specify the coordinate system of the label with the transform. If None, the default coordinate system will be the axes coordinate system: (0, 0) is bottom left, (0.5, 0.5) is center, etc.
matplotlib._as_gen.matplotlib.axis.axis.set_label_coords
matplotlib.axis.Axis.set_label_position Axis.set_label_position(position)[source] Set the label position (top or bottom) Parameters position{'top', 'bottom'} Examples using matplotlib.axis.Axis.set_label_position Title positioning
matplotlib._as_gen.matplotlib.axis.axis.set_label_position
matplotlib.axis.Axis.set_label_text Axis.set_label_text(label, fontdict=None, **kwargs)[source] Set the text value of the axis label. Parameters labelstr Text string. fontdictdict Text properties. **kwargs Merged into fontdict.
matplotlib._as_gen.matplotlib.axis.axis.set_label_text
matplotlib.axis.Axis.set_major_formatter Axis.set_major_formatter(formatter)[source] Set the formatter of the major ticker. In addition to a Formatter instance, this also accepts a str or function. For a str a StrMethodFormatter is used. The field used for the value must be labeled 'x' and the field used for the position must be labeled 'pos'. See the StrMethodFormatter documentation for more information. For a function, a FuncFormatter is used. The function must take two inputs (a tick value x and a position pos), and return a string containing the corresponding tick label. See the FuncFormatter documentation for more information. Parameters formatterFormatter, str, or function Examples using matplotlib.axis.Axis.set_major_formatter Creating a timeline with lines, dates, and text Date tick labels Custom tick formatter for time series Labeling ticks using engineering notation Dollar Ticks Bachelor's degrees by gender 3D surface (colormap) SkewT-logP diagram: using transforms and custom projections Centering labels between ticks Custom Ticker1 Formatting date ticks using ConciseDateFormatter Date Demo Convert Placing date ticks using recurrence rules Date Index Formatter Major and minor ticks Setting tick labels from a list of values Basic Usage The Lifecycle of a Plot Artist tutorial Choosing Colormaps in Matplotlib Text in Matplotlib Plots
matplotlib._as_gen.matplotlib.axis.axis.set_major_formatter
matplotlib.axis.Axis.set_major_locator Axis.set_major_locator(locator)[source] Set the locator of the major ticker. Parameters locatorLocator Examples using matplotlib.axis.Axis.set_major_locator Hatch-filled histograms Creating a timeline with lines, dates, and text Date tick labels Anatomy of a figure 3D surface (colormap) 3D surface (checkerboard) Scales MRI With EEG SkewT-logP diagram: using transforms and custom projections Centering labels between ticks Formatting date ticks using ConciseDateFormatter Date Demo Convert Placing date ticks using recurrence rules Major and minor ticks Setting tick labels from a list of values Choosing Colormaps in Matplotlib Text in Matplotlib Plots
matplotlib._as_gen.matplotlib.axis.axis.set_major_locator
matplotlib.axis.Axis.set_minor_formatter Axis.set_minor_formatter(formatter)[source] Set the formatter of the minor ticker. In addition to a Formatter instance, this also accepts a str or function. See Axis.set_major_formatter for more information. Parameters formatterFormatter, str, or function Examples using matplotlib.axis.Axis.set_minor_formatter Anatomy of a figure Scales SkewT-logP diagram: using transforms and custom projections Centering labels between ticks
matplotlib._as_gen.matplotlib.axis.axis.set_minor_formatter
matplotlib.axis.Axis.set_minor_locator Axis.set_minor_locator(locator)[source] Set the locator of the minor ticker. Parameters locatorLocator Examples using matplotlib.axis.Axis.set_minor_locator Secondary Axis Date tick labels Anatomy of a figure Centering labels between ticks Date Demo Convert Major and minor ticks
matplotlib._as_gen.matplotlib.axis.axis.set_minor_locator
matplotlib.axis.Axis.set_pickradius Axis.set_pickradius(pickradius)[source] Set the depth of the axis used by the picker. Parameters pickradiusfloat
matplotlib._as_gen.matplotlib.axis.axis.set_pickradius
matplotlib.axis.Axis.set_remove_overlapping_locs Axis.set_remove_overlapping_locs(val)[source]
matplotlib._as_gen.matplotlib.axis.axis.set_remove_overlapping_locs
matplotlib.axis.Axis.set_tick_params Axis.set_tick_params(which='major', reset=False, **kw)[source] Set appearance parameters for ticks, ticklabels, and gridlines. For documentation of keyword arguments, see matplotlib.axes.Axes.tick_params(). Examples using matplotlib.axis.Axis.set_tick_params Violin plot customization Dollar Ticks Scatter Histogram (Locatable Axes) Pythonic Matplotlib Placing date ticks using recurrence rules Date Precision and Epochs Choosing Colormaps in Matplotlib
matplotlib._as_gen.matplotlib.axis.axis.set_tick_params
matplotlib.axis.Axis.set_ticklabels Axis.set_ticklabels(ticklabels, *, minor=False, **kwargs)[source] Set the text values of the tick labels. Discouraged The use of this method is discouraged, because of the dependency on tick positions. In most cases, you'll want to use set_[x/y]ticks(positions, labels) instead. If you are using this method, you should always fix the tick positions before, e.g. by using Axis.set_ticks or by explicitly setting a FixedLocator. Otherwise, ticks are free to move and the labels may end up in unexpected positions. Parameters ticklabelssequence of str or of Texts Texts for labeling each tick location in the sequence set by Axis.set_ticks; the number of labels must match the number of locations. minorbool If True, set minor ticks instead of major ticks. **kwargs Text properties. Returns list of Texts For each tick, includes tick.label1 if it is visible, then tick.label2 if it is visible, in that order.
matplotlib._as_gen.matplotlib.axis.axis.set_ticklabels
matplotlib.axis.Axis.set_ticks Axis.set_ticks(ticks, labels=None, *, minor=False, **kwargs)[source] Set this Axis' tick locations and optionally labels. If necessary, the view limits of the Axis are expanded so that all given ticks are visible. Parameters tickslist of floats List of tick locations. labelslist of str, optional List of tick labels. If not set, the labels show the data value. minorbool, default: False If False, set the major ticks; if True, the minor ticks. **kwargs Text properties for the labels. These take effect only if you pass labels. In other cases, please use tick_params. Notes The mandatory expansion of the view limits is an intentional design choice to prevent the surprise of a non-visible tick. If you need other limits, you should set the limits explicitly after setting the ticks. Examples using matplotlib.axis.Axis.set_ticks Spine Placement
matplotlib._as_gen.matplotlib.axis.axis.set_ticks
matplotlib.axis.Axis.set_units Axis.set_units(u)[source] Set the units for axis. Parameters uunits tag Notes The units of any shared axis will also be updated. Examples using matplotlib.axis.Axis.set_units Artist tests Group barchart with units Unit handling
matplotlib._as_gen.matplotlib.axis.axis.set_units
matplotlib.axis.Axis.set_view_interval Axis.set_view_interval(vmin, vmax, ignore=False)[source] Set the axis view limits. This method is for internal use; Matplotlib users should typically use e.g. set_xlim or set_ylim. If ignore is False (the default), this method will never reduce the preexisting view limits, only expand them if vmin or vmax are not within them. Moreover, the order of vmin and vmax does not matter; the orientation of the axis will not change. If ignore is True, the view limits will be set exactly to (vmin, vmax) in that order.
matplotlib._as_gen.matplotlib.axis.axis.set_view_interval
matplotlib.axis.Axis.update_units Axis.update_units(data)[source] Introspect data for units converter and update the axis.converter instance if necessary. Return True if data is registered for unit conversion.
matplotlib._as_gen.matplotlib.axis.axis.update_units
classmatplotlib.axis.Tick(axes, loc, *, size=None, width=None, color=None, tickdir=None, pad=None, labelsize=None, labelcolor=None, zorder=None, gridOn=None, tick1On=True, tick2On=True, label1On=True, label2On=False, major=True, labelrotation=0, grid_color=None, grid_linestyle=None, grid_linewidth=None, grid_alpha=None, **kw)[source] Abstract 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). Attributes tick1lineLine2D The left/bottom tick marker. tick2lineLine2D The right/top tick marker. gridlineLine2D The grid line associated with the label position. label1Text The left/bottom tick label. label2Text The right/top tick label. 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
matplotlib.axis_api#matplotlib.axis.Tick
matplotlib.axis.Tick.get_loc Tick.get_loc()[source] Return the tick location (data coords) as a scalar.
matplotlib._as_gen.matplotlib.axis.tick.get_loc
matplotlib.axis.Tick.get_pad Tick.get_pad()[source] Get the value of the tick label pad in points.
matplotlib._as_gen.matplotlib.axis.tick.get_pad
matplotlib.axis.Tick.get_pad_pixels Tick.get_pad_pixels()[source]
matplotlib._as_gen.matplotlib.axis.tick.get_pad_pixels
matplotlib.axis.Tick.get_tick_padding Tick.get_tick_padding()[source] Get the length of the tick outside of the axes.
matplotlib._as_gen.matplotlib.axis.tick.get_tick_padding
matplotlib.axis.Tick.get_tickdir Tick.get_tickdir()[source]
matplotlib._as_gen.matplotlib.axis.tick.get_tickdir
matplotlib.axis.Tick.get_view_interval Tick.get_view_interval()[source] Return the view limits (min, max) of the axis the tick belongs to.
matplotlib._as_gen.matplotlib.axis.tick.get_view_interval
matplotlib.axis.Tick.set_label1 Tick.set_label1(s)[source] Set the label1 text. Parameters sstr
matplotlib._as_gen.matplotlib.axis.tick.set_label1
matplotlib.axis.Tick.set_label2 Tick.set_label2(s)[source] Set the label2 text. Parameters sstr
matplotlib._as_gen.matplotlib.axis.tick.set_label2
matplotlib.axis.Tick.set_pad Tick.set_pad(val)[source] Set the tick label pad in points Parameters valfloat
matplotlib._as_gen.matplotlib.axis.tick.set_pad
matplotlib.axis.Tick.set_url Tick.set_url(url)[source] Set the url of label1 and label2. Parameters urlstr
matplotlib._as_gen.matplotlib.axis.tick.set_url
matplotlib.axis.Tick.update_position Tick.update_position(loc)[source] Set the location of tick in data coords with scalar loc.
matplotlib._as_gen.matplotlib.axis.tick.update_position
classmatplotlib.axis.Ticker[source] A container for the objects defining tick position and format. Attributes locatormatplotlib.ticker.Locator subclass Determines the positions of the ticks. formattermatplotlib.ticker.Formatter subclass Determines the format of the tick labels.
matplotlib.axis_api#matplotlib.axis.Ticker
classmatplotlib.axis.XAxis(*args, **kwargs)[source] Parameters axesmatplotlib.axes.Axes The Axes to which the created Axis belongs. pickradiusfloat The acceptance radius for containment tests. See also Axis.contains.
matplotlib.axis_api#matplotlib.axis.XAxis
matplotlib.axis.XAxis.axis_name XAxis.axis_name='x' Read-only name identifying the axis.
matplotlib._as_gen.matplotlib.axis.xaxis.axis_name
matplotlib.axis.XAxis.get_text_heights XAxis.get_text_heights(renderer)[source] Return how much space should be reserved for text above and below the axes, as a pair of floats.
matplotlib._as_gen.matplotlib.axis.xaxis.get_text_heights
matplotlib.axis.XAxis.get_ticks_position XAxis.get_ticks_position()[source] Return the ticks position ("top", "bottom", "default", or "unknown").
matplotlib._as_gen.matplotlib.axis.xaxis.get_ticks_position
matplotlib.axis.XAxis.set_label_position XAxis.set_label_position(position)[source] Set the label position (top or bottom) Parameters position{'top', 'bottom'} Examples using matplotlib.axis.XAxis.set_label_position Title positioning
matplotlib._as_gen.matplotlib.axis.xaxis.set_label_position
matplotlib.axis.XAxis.set_ticks_position XAxis.set_ticks_position(position)[source] Set the ticks position. Parameters position{'top', 'bottom', 'both', 'default', 'none'} 'both' sets the ticks to appear on both positions, but does not change the tick labels. 'default' resets the tick positions to the default: ticks on both positions, labels at bottom. 'none' can be used if you don't want any ticks. 'none' and 'both' affect only the ticks, not the labels. Examples using matplotlib.axis.XAxis.set_ticks_position Violin plot customization Colorbar with AxesDivider Controlling the position and size of colorbars with Inset Axes Integral as the area under a curve XKCD Spine Placement Spines Custom spine bounds Dropped spines Choosing Colormaps in Matplotlib
matplotlib._as_gen.matplotlib.axis.xaxis.set_ticks_position
matplotlib.axis.XAxis.tick_bottom XAxis.tick_bottom()[source] Move ticks and ticklabels (if present) to the bottom of the axes. Examples using matplotlib.axis.XAxis.tick_bottom Broken Axis Bachelor's degrees by gender
matplotlib._as_gen.matplotlib.axis.xaxis.tick_bottom
matplotlib.axis.XAxis.tick_top XAxis.tick_top()[source] Move ticks and ticklabels (if present) to the top of the axes. Examples using matplotlib.axis.XAxis.tick_top Broken Axis Title positioning
matplotlib._as_gen.matplotlib.axis.xaxis.tick_top
classmatplotlib.axis.XTick(*args, **kwargs)[source] 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
matplotlib.axis_api#matplotlib.axis.XTick
classmatplotlib.axis.YAxis(*args, **kwargs)[source] Parameters axesmatplotlib.axes.Axes The Axes to which the created Axis belongs. pickradiusfloat The acceptance radius for containment tests. See also Axis.contains.
matplotlib.axis_api#matplotlib.axis.YAxis
matplotlib.axis.YAxis.axis_name YAxis.axis_name='y' Read-only name identifying the axis.
matplotlib._as_gen.matplotlib.axis.yaxis.axis_name
matplotlib.axis.YAxis.get_text_widths YAxis.get_text_widths(renderer)[source]
matplotlib._as_gen.matplotlib.axis.yaxis.get_text_widths
matplotlib.axis.YAxis.get_ticks_position YAxis.get_ticks_position()[source] Return the ticks position ("left", "right", "default", or "unknown").
matplotlib._as_gen.matplotlib.axis.yaxis.get_ticks_position
matplotlib.axis.YAxis.set_label_position YAxis.set_label_position(position)[source] Set the label position (left or right) Parameters position{'left', 'right'}
matplotlib._as_gen.matplotlib.axis.yaxis.set_label_position
matplotlib.axis.YAxis.set_offset_position YAxis.set_offset_position(position)[source] Parameters position{'left', 'right'}
matplotlib._as_gen.matplotlib.axis.yaxis.set_offset_position
matplotlib.axis.YAxis.set_ticks_position YAxis.set_ticks_position(position)[source] Set the ticks position. Parameters position{'left', 'right', 'both', 'default', 'none'} 'both' sets the ticks to appear on both positions, but does not change the tick labels. 'default' resets the tick positions to the default: ticks on both positions, labels at left. 'none' can be used if you don't want any ticks. 'none' and 'both' affect only the ticks, not the labels. Examples using matplotlib.axis.YAxis.set_ticks_position Spine Placement Spines Custom spine bounds Dropped spines
matplotlib._as_gen.matplotlib.axis.yaxis.set_ticks_position
matplotlib.axis.YAxis.tick_left YAxis.tick_left()[source] Move ticks and ticklabels (if present) to the left of the axes. Examples using matplotlib.axis.YAxis.tick_left Bachelor's degrees by gender Set default y-axis tick labels on the right
matplotlib._as_gen.matplotlib.axis.yaxis.tick_left
matplotlib.axis.YAxis.tick_right YAxis.tick_right()[source] Move ticks and ticklabels (if present) to the right of the axes.
matplotlib._as_gen.matplotlib.axis.yaxis.tick_right
classmatplotlib.axis.YTick(*args, **kwargs)[source] 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
matplotlib.axis_api#matplotlib.axis.YTick