Personal tools
You are here: Home Zpydoc API documentation matplotlib.axis

 matplotlib.axis  

Up one level
matplotlib axis
Classes for the ticks and x and y axis
Modules
matplotlib.artist matplotlib.lines matplotlib.text matplotlib.units
matplotlib.cbook matplotlib.patches matplotlib.ticker
matplotlib.font_manager matplotlib.scale matplotlib.transforms
Classes
  class Axis ( Artist )
Public attributes * transData - transform data coords to display coords * transAxis - transform axis coords to display coords
add_callback(self, func)
cla(self)
clear the current axis
contains(self, mouseevent)
Test whether the artist contains the mouse event. Returns the truth value and a dictionary of artist specific details of selection, such as which points are contained in the pick radius. See individual artists for details.
convert_units(self, x)
convert_xunits(self, x)
for artists in an axes, if the xaxis as units support, convert x using xaxis unit type
convert_yunits(self, y)
for artists in an axes, if the yaxis as units support, convert y using yaxis unit type
draw(self, renderer, *args, **kwargs)
Draw the axis lines, grid lines, tick lines and labels
get_alpha(self)
Return the alpha value used for blending - not supported on all backends
get_animated(self)
return the artist's animated state
get_axes(self)
return the axes instance the artist resides in, or None
get_children(self)
get_clip_box(self)
Return artist clipbox
get_clip_on(self)
Return whether artist uses clipping
get_clip_path(self)
Return artist clip path
get_contains(self)
return the _contains test used by the artist, or None for default.
get_data_interval(self)
return the Interval instance for this axis data limits
get_figure(self)
Return the :class:`~matplotlib.figure.Figure` instance the artist belongs to.
get_gridlines(self)
Return the grid lines as a list of Line2D instance
get_label(self)
Return the axis label as a Text instance
get_major_formatter(self)
Get the formatter of the major ticker
get_major_locator(self)
Get the locator of the major ticker
get_major_ticks(self, numticks=None)
get the tick instances; grow as necessary
get_majorticklabels(self)
Return a list of Text instances for the major ticklabels
get_majorticklines(self)
Return the major tick lines as a list of Line2D instances
get_majorticklocs(self)
Get the major tick locations in data coordinates as a numpy array
get_minor_formatter(self)
Get the formatter of the minor ticker
get_minor_locator(self)
Get the locator of the minor ticker
get_minor_ticks(self, numticks=None)
get the minor tick instances; grow as necessary
get_minorticklabels(self)
Return a list of Text instances for the minor ticklabels
get_minorticklines(self)
Return the minor tick lines as a list of Line2D instances
get_minorticklocs(self)
Get the minor tick locations in data coordinates as a numpy array
get_offset_text(self)
Return the axis offsetText as a Text instance
get_picker(self)
return the Pickeration instance used by this artist
get_pickradius(self)
Return the depth of the axis used by the picker
get_scale(self)
get_ticklabel_extents(self, renderer)
Get the extents of the tick labels on either side of the axes.
get_ticklabels(self, minor=False)
Return a list of Text instances for ticklabels
get_ticklines(self, minor=False)
Return the tick lines as a list of Line2D instances
get_ticklocs(self, minor=False)
Get the tick locations in data coordinates as a numpy array
get_transform(self)
get_transformed_clip_path_and_affine(self)
Return the clip path with the non-affine part of its transformation applied, and the remaining affine part of its transformation.
get_units(self)
return the units for axis
get_view_interval(self)
return the Interval instance for this axis view limits
get_visible(self)
return the artist's visiblity
get_zorder(self)
grid(self, b=None, which='major', **kwargs)
Set the axis grid on or off; b is a boolean use which = 'major' | 'minor' to set the grid for major or minor ticks if b is None and len(kwargs)==0, toggle the grid state. If kwargs are supplied, it is assumed you want the grid on and b will be set to True kwargs are used to set the line properties of the grids, eg, xax.grid(color='r', linestyle='-', linewidth=2)
have_units(self)
hitlist(self, event)
List the children of the artist which contain the mouse event
is_figure_set(self)
is_transform_set(self)
Artist has transform explicity let
iter_ticks(self)
Iterate through all of the major and minor ticks.
limit_range_for_scale(self, vmin, vmax)
pan(self, numsteps)
Pan numticks (can be positive or negative)
pchanged(self)
fire event when property changed
pick(self, mouseevent)
pick(mouseevent) each child artist will fire a pick event if mouseevent is over the artist and the artist has picker set
pickable(self)
return True if self is pickable
remove(self)
Remove the artist from the figure if possible. The effect will not be visible until the figure is redrawn, e.g., with :meth:`matplotlib.axes.Axes.draw_idle`. Call :meth:`matplotlib.axes.Axes.relim` to update the axes limits if desired. Note: :meth:`~matplotlib.axes.Axes.relim` will not see collections even if the collection was added to axes with *autolim* = True. Note: there is no support for removing the artist's legend entry.
remove_callback(self, oid)
set(self, **kwargs)
A tkstyle set command, pass kwargs to set properties
set_alpha(self, alpha)
Set the alpha value used for blending - not supported on all backends ACCEPTS: float
set_animated(self, b)
set the artist's animation state ACCEPTS: [True | False]
set_axes(self, axes)
set the axes instance the artist resides in, if any ACCEPTS: an axes instance
set_clip_box(self, clipbox)
Set the artist's clip Bbox ACCEPTS: a matplotlib.transform.Bbox instance
set_clip_on(self, b)
Set whether artist uses clipping ACCEPTS: [True | False]
set_clip_path(self, clippath, transform=None)
set_contains(self, picker)
Replace the contains test used by this artist. The new picker should be a callable function which determines whether the artist is hit by the mouse event:: hit, props = picker(artist, mouseevent) If the mouse event is over the artist, return hit=True and props is a dictionary of properties you want returned with the contains test.
set_data_interval(self)
Set the axis data limits
set_figure(self, fig)
Set the :class:`~matplotlib.figure.Figure` instance the artist belongs to. ACCEPTS: a matplotlib.figure.Figure instance
set_label(self, s)
Set the line label to s for auto legend ACCEPTS: any string
set_label_coords(self, x, y, transform=None)
Set the coordinates of the label. By default, the x coordinate of the y label is determined by the tick label bounding boxes, but this can lead to poor alignment of multiple ylabels if there are multiple axes. Ditto for the y coodinate of the x label. 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 (left,bottom), (0.5, 0.5) is middle, etc
set_lod(self, on)
Set Level of Detail on or off. If on, the artists may examine things like the pixel width of the axes and draw a subset of their contents accordingly ACCEPTS: [True | False]
set_major_formatter(self, formatter)
Set the formatter of the major ticker ACCEPTS: A Formatter instance
set_major_locator(self, locator)
Set the locator of the major ticker ACCEPTS: a Locator instance
set_minor_formatter(self, formatter)
Set the formatter of the minor ticker ACCEPTS: A Formatter instance
set_minor_locator(self, locator)
Set the locator of the minor ticker ACCEPTS: a Locator instance
set_picker(self, picker)
set the epsilon for picking used by this artist picker can be one of the following: None - picking is disabled for this artist (default) boolean - if True then picking will be enabled and the artist will fire a pick event if the mouse event is over the artist float - if picker is a number it is interpreted as an epsilon tolerance in points and the the artist will fire off an event if it's data is within epsilon of the mouse event. For some artists like lines and patch collections, the artist may provide additional data to the pick event that is generated, eg the indices of the data within epsilon of the pick event function - if picker is callable, it is a user supplied function which determines whether the artist is hit by the mouse event:: hit, props = picker(artist, mouseevent) to determine the hit test. if the mouse event is over the artist, return hit=True and props is a dictionary of properties you want added to the PickEvent attributes. ACCEPTS: [None|float|boolean|callable]
set_pickradius(self, pickradius)
Set the depth of the axis used by the picker ACCEPTS: a distance in points
set_scale(self, value, **kwargs)
set_ticklabels(self, ticklabels, *args, **kwargs)
Set the text values of the tick labels. Return a list of Text instances. Use kwarg minor=True to select minor ticks. ACCEPTS: sequence of strings
set_ticks(self, ticks, minor=False)
Set the locations of the tick marks from sequence ticks ACCEPTS: sequence of floats
set_transform(self, t)
Set the :class:`~matplotlib.transforms.Transform` instance used by this artist.
set_units(self, u)
set the units for axis ACCEPTS: a units tag
set_view_interval(self, vmin, vmax, ignore=False)
set_visible(self, b)
set the artist's visiblity ACCEPTS: [True | False]
set_zorder(self, level)
Set the zorder for the artist ACCEPTS: any number
update(self, props)
update_from(self, other)
Copy properties from *other* to *self*.
update_units(self, data)
introspect data for units converter and update the axis.converter instance if necessary. Return true is data is registered for unit conversion
zoom(self, direction)
Zoom in/out on axis; if direction is >0 zoom in, else zoom out
  class Tick ( Artist )
Abstract base class for the axis ticks, grid lines and labels 1 refers to the bottom of the plot for xticks and the left for yticks 2 refers to the top of the plot for xticks and the right for yticks Publicly accessible attributes: :attr:`tick1line` a Line2D instance :attr:`tick2line` a Line2D instance :attr:`gridline` a Line2D instance :attr:`label1` a Text instance :attr:`label2` a Text instance :attr:`gridOn` a boolean which determines whether to draw the tickline :attr:`tick1On` a boolean which determines whether to draw the 1st tickline :attr:`tick2On` a boolean which determines whether to draw the 2nd tickline :attr:`label1On` a boolean which determines whether to draw tick label :attr:`label2On` a boolean which determines whether to draw tick label
add_callback(self, func)
contains(self, mouseevent)
Test whether the mouse event occured in the Tick marks. This function always returns false. It is more useful to test if the axis as a whole contains the mouse rather than the set of tick marks.
convert_xunits(self, x)
for artists in an axes, if the xaxis as units support, convert x using xaxis unit type
convert_yunits(self, y)
for artists in an axes, if the yaxis as units support, convert y using yaxis unit type
draw(self, renderer)
get_alpha(self)
Return the alpha value used for blending - not supported on all backends
get_animated(self)
return the artist's animated state
get_axes(self)
return the axes instance the artist resides in, or None
get_children(self)
get_clip_box(self)
Return artist clipbox
get_clip_on(self)
Return whether artist uses clipping
get_clip_path(self)
Return artist clip path
get_contains(self)
return the _contains test used by the artist, or None for default.
get_figure(self)
Return the :class:`~matplotlib.figure.Figure` instance the artist belongs to.
get_label(self)
get_loc(self)
Return the tick location (data coords) as a scalar
get_pad(self, val)
Get the value of the tick label pad in points
get_pad_pixels(self)
get_picker(self)
return the Pickeration instance used by this artist
get_transform(self)
Return the :class:`~matplotlib.transforms.Transform` instance used by this artist.
get_transformed_clip_path_and_affine(self)
Return the clip path with the non-affine part of its transformation applied, and the remaining affine part of its transformation.
get_view_interval(self)
return the view Interval instance for the axis tjis tick is ticking
get_visible(self)
return the artist's visiblity
get_zorder(self)
have_units(self)
return True if units are set on the x or y axes
hitlist(self, event)
List the children of the artist which contain the mouse event
is_figure_set(self)
is_transform_set(self)
Artist has transform explicity let
pchanged(self)
fire event when property changed
pick(self, mouseevent)
pick(mouseevent) each child artist will fire a pick event if mouseevent is over the artist and the artist has picker set
pickable(self)
return True if self is pickable
remove(self)
Remove the artist from the figure if possible. The effect will not be visible until the figure is redrawn, e.g., with :meth:`matplotlib.axes.Axes.draw_idle`. Call :meth:`matplotlib.axes.Axes.relim` to update the axes limits if desired. Note: :meth:`~matplotlib.axes.Axes.relim` will not see collections even if the collection was added to axes with *autolim* = True. Note: there is no support for removing the artist's legend entry.
remove_callback(self, oid)
set(self, **kwargs)
A tkstyle set command, pass kwargs to set properties
set_alpha(self, alpha)
Set the alpha value used for blending - not supported on all backends ACCEPTS: float
set_animated(self, b)
set the artist's animation state ACCEPTS: [True | False]
set_axes(self, axes)
set the axes instance the artist resides in, if any ACCEPTS: an axes instance
set_clip_box(self, clipbox)
Set the artist's clip Bbox ACCEPTS: a matplotlib.transform.Bbox instance
set_clip_on(self, b)
Set whether artist uses clipping ACCEPTS: [True | False]
set_clip_path(self, clippath, transform=None)
Set the artist's clip path, which may be: a) a :class:`~matplotlib.patches.Patch` (or subclass) instance b) a :class:`~matplotlib.path.Path` instance, in which case an optional :class:`~matplotlib.transforms.Transform` instance may be provided, which will be applied to the path before using it for clipping. c) *None*, to remove the clipping path For efficiency, if the path happens to be an axis-aligned rectangle, this method will set the clipping box to the corresponding rectangle and set the clipping path to *None*. ACCEPTS: a Path instance and a Transform instance, a Patch instance, or None
set_contains(self, picker)
Replace the contains test used by this artist. The new picker should be a callable function which determines whether the artist is hit by the mouse event:: hit, props = picker(artist, mouseevent) If the mouse event is over the artist, return hit=True and props is a dictionary of properties you want returned with the contains test.
set_figure(self, fig)
Set the :class:`~matplotlib.figure.Figure` instance the artist belongs to. ACCEPTS: a matplotlib.figure.Figure instance
set_label1(self, s)
Set the text of ticklabel ACCEPTS: str
set_label1(self, s)
Set the text of ticklabel ACCEPTS: str
set_label2(self, s)
Set the text of ticklabel2 ACCEPTS: str
set_lod(self, on)
Set Level of Detail on or off. If on, the artists may examine things like the pixel width of the axes and draw a subset of their contents accordingly ACCEPTS: [True | False]
set_pad(self, val)
Set the tick label pad in points ACCEPTS: float
set_picker(self, picker)
set the epsilon for picking used by this artist picker can be one of the following: None - picking is disabled for this artist (default) boolean - if True then picking will be enabled and the artist will fire a pick event if the mouse event is over the artist float - if picker is a number it is interpreted as an epsilon tolerance in points and the the artist will fire off an event if it's data is within epsilon of the mouse event. For some artists like lines and patch collections, the artist may provide additional data to the pick event that is generated, eg the indices of the data within epsilon of the pick event function - if picker is callable, it is a user supplied function which determines whether the artist is hit by the mouse event:: hit, props = picker(artist, mouseevent) to determine the hit test. if the mouse event is over the artist, return hit=True and props is a dictionary of properties you want added to the PickEvent attributes. ACCEPTS: [None|float|boolean|callable]
set_transform(self, t)
Set the :class:`~matplotlib.transforms.Transform` instance used by this artist.
set_view_interval(self, vmin, vmax, ignore=False)
set_visible(self, b)
set the artist's visiblity ACCEPTS: [True | False]
set_zorder(self, level)
Set the zorder for the artist ACCEPTS: any number
update(self, props)
update_from(self, other)
Copy properties from *other* to *self*.
  class Ticker ( )
  class XAxis ( Axis )
add_callback(self, func)
cla(self)
clear the current axis
contains(self, mouseevent)
Test whether the mouse event occured in the x axis.
convert_units(self, x)
convert_xunits(self, x)
for artists in an axes, if the xaxis as units support, convert x using xaxis unit type
convert_yunits(self, y)
for artists in an axes, if the yaxis as units support, convert y using yaxis unit type
draw(self, renderer, *args, **kwargs)
Draw the axis lines, grid lines, tick lines and labels
get_alpha(self)
Return the alpha value used for blending - not supported on all backends
get_animated(self)
return the artist's animated state
get_axes(self)
return the axes instance the artist resides in, or None
get_children(self)
get_clip_box(self)
Return artist clipbox
get_clip_on(self)
Return whether artist uses clipping
get_clip_path(self)
Return artist clip path
get_contains(self)
return the _contains test used by the artist, or None for default.
get_data_interval(self)
return the Interval instance for this axis data limits
get_figure(self)
Return the :class:`~matplotlib.figure.Figure` instance the artist belongs to.
get_gridlines(self)
Return the grid lines as a list of Line2D instance
get_label(self)
Return the axis label as a Text instance
get_label_position(self)
Return the label position (top or bottom)
get_major_formatter(self)
Get the formatter of the major ticker
get_major_locator(self)
Get the locator of the major ticker
get_major_ticks(self, numticks=None)
get the tick instances; grow as necessary
get_majorticklabels(self)
Return a list of Text instances for the major ticklabels
get_majorticklines(self)
Return the major tick lines as a list of Line2D instances
get_majorticklocs(self)
Get the major tick locations in data coordinates as a numpy array
get_minor_formatter(self)
Get the formatter of the minor ticker
get_minor_locator(self)
Get the locator of the minor ticker
get_minor_ticks(self, numticks=None)
get the minor tick instances; grow as necessary
get_minorticklabels(self)
Return a list of Text instances for the minor ticklabels
get_minorticklines(self)
Return the minor tick lines as a list of Line2D instances
get_minorticklocs(self)
Get the minor tick locations in data coordinates as a numpy array
get_minpos(self)
get_offset_text(self)
Return the axis offsetText as a Text instance
get_picker(self)
return the Pickeration instance used by this artist
get_pickradius(self)
Return the depth of the axis used by the picker
get_scale(self)
get_text_heights(self, renderer)
Returns the amount of space one should reserve for text above and below the axes. Returns a tuple (above, below)
get_ticklabel_extents(self, renderer)
Get the extents of the tick labels on either side of the axes.
get_ticklabels(self, minor=False)
Return a list of Text instances for ticklabels
get_ticklines(self, minor=False)
Return the tick lines as a list of Line2D instances
get_ticklocs(self, minor=False)
Get the tick locations in data coordinates as a numpy array
get_ticks_position(self)
Return the ticks position (top, bottom, default or unknown)
get_transform(self)
get_transformed_clip_path_and_affine(self)
Return the clip path with the non-affine part of its transformation applied, and the remaining affine part of its transformation.
get_units(self)
return the units for axis
get_view_interval(self)
return the Interval instance for this axis view limits
get_visible(self)
return the artist's visiblity
get_zorder(self)
grid(self, b=None, which='major', **kwargs)
Set the axis grid on or off; b is a boolean use which = 'major' | 'minor' to set the grid for major or minor ticks if b is None and len(kwargs)==0, toggle the grid state. If kwargs are supplied, it is assumed you want the grid on and b will be set to True kwargs are used to set the line properties of the grids, eg, xax.grid(color='r', linestyle='-', linewidth=2)
have_units(self)
hitlist(self, event)
List the children of the artist which contain the mouse event
is_figure_set(self)
is_transform_set(self)
Artist has transform explicity let
iter_ticks(self)
Iterate through all of the major and minor ticks.
limit_range_for_scale(self, vmin, vmax)
pan(self, numsteps)
Pan numticks (can be positive or negative)
pchanged(self)
fire event when property changed
pick(self, mouseevent)
pick(mouseevent) each child artist will fire a pick event if mouseevent is over the artist and the artist has picker set
pickable(self)
return True if self is pickable
remove(self)
Remove the artist from the figure if possible. The effect will not be visible until the figure is redrawn, e.g., with :meth:`matplotlib.axes.Axes.draw_idle`. Call :meth:`matplotlib.axes.Axes.relim` to update the axes limits if desired. Note: :meth:`~matplotlib.axes.Axes.relim` will not see collections even if the collection was added to axes with *autolim* = True. Note: there is no support for removing the artist's legend entry.
remove_callback(self, oid)
set(self, **kwargs)
A tkstyle set command, pass kwargs to set properties
set_alpha(self, alpha)
Set the alpha value used for blending - not supported on all backends ACCEPTS: float
set_animated(self, b)
set the artist's animation state ACCEPTS: [True | False]
set_axes(self, axes)
set the axes instance the artist resides in, if any ACCEPTS: an axes instance
set_clip_box(self, clipbox)
Set the artist's clip Bbox ACCEPTS: a matplotlib.transform.Bbox instance
set_clip_on(self, b)
Set whether artist uses clipping ACCEPTS: [True | False]
set_clip_path(self, clippath, transform=None)
set_contains(self, picker)
Replace the contains test used by this artist. The new picker should be a callable function which determines whether the artist is hit by the mouse event:: hit, props = picker(artist, mouseevent) If the mouse event is over the artist, return hit=True and props is a dictionary of properties you want returned with the contains test.
set_data_interval(self, vmin, vmax, ignore=False)
return the Interval instance for this axis data limits
set_figure(self, fig)
Set the :class:`~matplotlib.figure.Figure` instance the artist belongs to. ACCEPTS: a matplotlib.figure.Figure instance
set_label(self, s)
Set the line label to s for auto legend ACCEPTS: any string
set_label_coords(self, x, y, transform=None)
Set the coordinates of the label. By default, the x coordinate of the y label is determined by the tick label bounding boxes, but this can lead to poor alignment of multiple ylabels if there are multiple axes. Ditto for the y coodinate of the x label. 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 (left,bottom), (0.5, 0.5) is middle, etc
set_label_position(self, position)
Set the label position (top or bottom) ACCEPTS: [ 'top' | 'bottom' ]
set_lod(self, on)
Set Level of Detail on or off. If on, the artists may examine things like the pixel width of the axes and draw a subset of their contents accordingly ACCEPTS: [True | False]
set_major_formatter(self, formatter)
Set the formatter of the major ticker ACCEPTS: A Formatter instance
set_major_locator(self, locator)
Set the locator of the major ticker ACCEPTS: a Locator instance
set_minor_formatter(self, formatter)
Set the formatter of the minor ticker ACCEPTS: A Formatter instance
set_minor_locator(self, locator)
Set the locator of the minor ticker ACCEPTS: a Locator instance
set_picker(self, picker)
set the epsilon for picking used by this artist picker can be one of the following: None - picking is disabled for this artist (default) boolean - if True then picking will be enabled and the artist will fire a pick event if the mouse event is over the artist float - if picker is a number it is interpreted as an epsilon tolerance in points and the the artist will fire off an event if it's data is within epsilon of the mouse event. For some artists like lines and patch collections, the artist may provide additional data to the pick event that is generated, eg the indices of the data within epsilon of the pick event function - if picker is callable, it is a user supplied function which determines whether the artist is hit by the mouse event:: hit, props = picker(artist, mouseevent) to determine the hit test. if the mouse event is over the artist, return hit=True and props is a dictionary of properties you want added to the PickEvent attributes. ACCEPTS: [None|float|boolean|callable]
set_pickradius(self, pickradius)
Set the depth of the axis used by the picker ACCEPTS: a distance in points
set_scale(self, value, **kwargs)
set_ticklabels(self, ticklabels, *args, **kwargs)
Set the text values of the tick labels. Return a list of Text instances. Use kwarg minor=True to select minor ticks. ACCEPTS: sequence of strings
set_ticks(self, ticks, minor=False)
Set the locations of the tick marks from sequence ticks ACCEPTS: sequence of floats
set_ticks_position(self, position)
Set the ticks position (top, bottom, both, default or 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. ACCEPTS: [ 'top' | 'bottom' | 'both' | 'default' | 'none' ]
set_transform(self, t)
Set the :class:`~matplotlib.transforms.Transform` instance used by this artist.
set_units(self, u)
set the units for axis ACCEPTS: a units tag
set_view_interval(self, vmin, vmax, ignore=False)
set_visible(self, b)
set the artist's visiblity ACCEPTS: [True | False]
set_zorder(self, level)
Set the zorder for the artist ACCEPTS: any number
tick_bottom(self)
use ticks only on bottom
tick_top(self)
use ticks only on top
update(self, props)
update_from(self, other)
Copy properties from *other* to *self*.
update_units(self, data)
introspect data for units converter and update the axis.converter instance if necessary. Return true is data is registered for unit conversion
zoom(self, direction)
Zoom in/out on axis; if direction is >0 zoom in, else zoom out
  class XTick ( Tick )
Contains all the Artists needed to make an x tick - the tick line, the label text and the grid line
add_callback(self, func)
contains(self, mouseevent)
Test whether the mouse event occured in the Tick marks. This function always returns false. It is more useful to test if the axis as a whole contains the mouse rather than the set of tick marks.
convert_xunits(self, x)
for artists in an axes, if the xaxis as units support, convert x using xaxis unit type
convert_yunits(self, y)
for artists in an axes, if the yaxis as units support, convert y using yaxis unit type
draw(self, renderer)
get_alpha(self)
Return the alpha value used for blending - not supported on all backends
get_animated(self)
return the artist's animated state
get_axes(self)
return the axes instance the artist resides in, or None
get_children(self)
get_clip_box(self)
Return artist clipbox
get_clip_on(self)
Return whether artist uses clipping
get_clip_path(self)
Return artist clip path
get_contains(self)
return the _contains test used by the artist, or None for default.
get_data_interval(self)
return the Interval instance for this axis data limits
get_figure(self)
Return the :class:`~matplotlib.figure.Figure` instance the artist belongs to.
get_label(self)
get_loc(self)
Return the tick location (data coords) as a scalar
get_minpos(self)
get_pad(self, val)
Get the value of the tick label pad in points
get_pad_pixels(self)
get_picker(self)
return the Pickeration instance used by this artist
get_transform(self)
Return the :class:`~matplotlib.transforms.Transform` instance used by this artist.
get_transformed_clip_path_and_affine(self)
Return the clip path with the non-affine part of its transformation applied, and the remaining affine part of its transformation.
get_view_interval(self)
return the Interval instance for this axis view limits
get_visible(self)
return the artist's visiblity
get_zorder(self)
have_units(self)
return True if units are set on the x or y axes
hitlist(self, event)
List the children of the artist which contain the mouse event
is_figure_set(self)
is_transform_set(self)
Artist has transform explicity let
pchanged(self)
fire event when property changed
pick(self, mouseevent)
pick(mouseevent) each child artist will fire a pick event if mouseevent is over the artist and the artist has picker set
pickable(self)
return True if self is pickable
remove(self)
Remove the artist from the figure if possible. The effect will not be visible until the figure is redrawn, e.g., with :meth:`matplotlib.axes.Axes.draw_idle`. Call :meth:`matplotlib.axes.Axes.relim` to update the axes limits if desired. Note: :meth:`~matplotlib.axes.Axes.relim` will not see collections even if the collection was added to axes with *autolim* = True. Note: there is no support for removing the artist's legend entry.
remove_callback(self, oid)
set(self, **kwargs)
A tkstyle set command, pass kwargs to set properties
set_alpha(self, alpha)
Set the alpha value used for blending - not supported on all backends ACCEPTS: float
set_animated(self, b)
set the artist's animation state ACCEPTS: [True | False]
set_axes(self, axes)
set the axes instance the artist resides in, if any ACCEPTS: an axes instance
set_clip_box(self, clipbox)
Set the artist's clip Bbox ACCEPTS: a matplotlib.transform.Bbox instance
set_clip_on(self, b)
Set whether artist uses clipping ACCEPTS: [True | False]
set_clip_path(self, clippath, transform=None)
Set the artist's clip path, which may be: a) a :class:`~matplotlib.patches.Patch` (or subclass) instance b) a :class:`~matplotlib.path.Path` instance, in which case an optional :class:`~matplotlib.transforms.Transform` instance may be provided, which will be applied to the path before using it for clipping. c) *None*, to remove the clipping path For efficiency, if the path happens to be an axis-aligned rectangle, this method will set the clipping box to the corresponding rectangle and set the clipping path to *None*. ACCEPTS: a Path instance and a Transform instance, a Patch instance, or None
set_contains(self, picker)
Replace the contains test used by this artist. The new picker should be a callable function which determines whether the artist is hit by the mouse event:: hit, props = picker(artist, mouseevent) If the mouse event is over the artist, return hit=True and props is a dictionary of properties you want returned with the contains test.
set_figure(self, fig)
Set the :class:`~matplotlib.figure.Figure` instance the artist belongs to. ACCEPTS: a matplotlib.figure.Figure instance
set_label1(self, s)
Set the text of ticklabel ACCEPTS: str
set_label1(self, s)
Set the text of ticklabel ACCEPTS: str
set_label2(self, s)
Set the text of ticklabel2 ACCEPTS: str
set_lod(self, on)
Set Level of Detail on or off. If on, the artists may examine things like the pixel width of the axes and draw a subset of their contents accordingly ACCEPTS: [True | False]
set_pad(self, val)
Set the tick label pad in points ACCEPTS: float
set_picker(self, picker)
set the epsilon for picking used by this artist picker can be one of the following: None - picking is disabled for this artist (default) boolean - if True then picking will be enabled and the artist will fire a pick event if the mouse event is over the artist float - if picker is a number it is interpreted as an epsilon tolerance in points and the the artist will fire off an event if it's data is within epsilon of the mouse event. For some artists like lines and patch collections, the artist may provide additional data to the pick event that is generated, eg the indices of the data within epsilon of the pick event function - if picker is callable, it is a user supplied function which determines whether the artist is hit by the mouse event:: hit, props = picker(artist, mouseevent) to determine the hit test. if the mouse event is over the artist, return hit=True and props is a dictionary of properties you want added to the PickEvent attributes. ACCEPTS: [None|float|boolean|callable]
set_transform(self, t)
Set the :class:`~matplotlib.transforms.Transform` instance used by this artist.
set_view_interval(self, vmin, vmax, ignore=False)
set_visible(self, b)
set the artist's visiblity ACCEPTS: [True | False]
set_zorder(self, level)
Set the zorder for the artist ACCEPTS: any number
update(self, props)
update_from(self, other)
Copy properties from *other* to *self*.
update_position(self, loc)
Set the location of tick in data coords with scalar loc
  class YAxis ( Axis )
add_callback(self, func)
cla(self)
clear the current axis
contains(self, mouseevent)
Test whether the mouse event occurred in the y axis. Returns T/F, {}
convert_units(self, x)
convert_xunits(self, x)
for artists in an axes, if the xaxis as units support, convert x using xaxis unit type
convert_yunits(self, y)
for artists in an axes, if the yaxis as units support, convert y using yaxis unit type
draw(self, renderer, *args, **kwargs)
Draw the axis lines, grid lines, tick lines and labels
get_alpha(self)
Return the alpha value used for blending - not supported on all backends
get_animated(self)
return the artist's animated state
get_axes(self)
return the axes instance the artist resides in, or None
get_children(self)
get_clip_box(self)
Return artist clipbox
get_clip_on(self)
Return whether artist uses clipping
get_clip_path(self)
Return artist clip path
get_contains(self)
return the _contains test used by the artist, or None for default.
get_data_interval(self)
return the Interval instance for this axis data limits
get_figure(self)
Return the :class:`~matplotlib.figure.Figure` instance the artist belongs to.
get_gridlines(self)
Return the grid lines as a list of Line2D instance
get_label(self)
Return the axis label as a Text instance
get_label_position(self)
Return the label position (left or right)
get_major_formatter(self)
Get the formatter of the major ticker
get_major_locator(self)
Get the locator of the major ticker
get_major_ticks(self, numticks=None)
get the tick instances; grow as necessary
get_majorticklabels(self)
Return a list of Text instances for the major ticklabels
get_majorticklines(self)
Return the major tick lines as a list of Line2D instances
get_majorticklocs(self)
Get the major tick locations in data coordinates as a numpy array
get_minor_formatter(self)
Get the formatter of the minor ticker
get_minor_locator(self)
Get the locator of the minor ticker
get_minor_ticks(self, numticks=None)
get the minor tick instances; grow as necessary
get_minorticklabels(self)
Return a list of Text instances for the minor ticklabels
get_minorticklines(self)
Return the minor tick lines as a list of Line2D instances
get_minorticklocs(self)
Get the minor tick locations in data coordinates as a numpy array
get_minpos(self)
get_offset_text(self)
Return the axis offsetText as a Text instance
get_picker(self)
return the Pickeration instance used by this artist
get_pickradius(self)
Return the depth of the axis used by the picker
get_scale(self)
get_text_widths(self, renderer)
get_ticklabel_extents(self, renderer)
Get the extents of the tick labels on either side of the axes.
get_ticklabels(self, minor=False)
Return a list of Text instances for ticklabels
get_ticklines(self, minor=False)
Return the tick lines as a list of Line2D instances
get_ticklocs(self, minor=False)
Get the tick locations in data coordinates as a numpy array
get_ticks_position(self)
Return the ticks position (left, right, both or unknown)
get_transform(self)
get_transformed_clip_path_and_affine(self)
Return the clip path with the non-affine part of its transformation applied, and the remaining affine part of its transformation.
get_units(self)
return the units for axis
get_view_interval(self)
return the Interval instance for this axis view limits
get_visible(self)
return the artist's visiblity
get_zorder(self)
grid(self, b=None, which='major', **kwargs)
Set the axis grid on or off; b is a boolean use which = 'major' | 'minor' to set the grid for major or minor ticks if b is None and len(kwargs)==0, toggle the grid state. If kwargs are supplied, it is assumed you want the grid on and b will be set to True kwargs are used to set the line properties of the grids, eg, xax.grid(color='r', linestyle='-', linewidth=2)
have_units(self)
hitlist(self, event)
List the children of the artist which contain the mouse event
is_figure_set(self)
is_transform_set(self)
Artist has transform explicity let
iter_ticks(self)
Iterate through all of the major and minor ticks.
limit_range_for_scale(self, vmin, vmax)
pan(self, numsteps)
Pan numticks (can be positive or negative)
pchanged(self)
fire event when property changed
pick(self, mouseevent)
pick(mouseevent) each child artist will fire a pick event if mouseevent is over the artist and the artist has picker set
pickable(self)
return True if self is pickable
remove(self)
Remove the artist from the figure if possible. The effect will not be visible until the figure is redrawn, e.g., with :meth:`matplotlib.axes.Axes.draw_idle`. Call :meth:`matplotlib.axes.Axes.relim` to update the axes limits if desired. Note: :meth:`~matplotlib.axes.Axes.relim` will not see collections even if the collection was added to axes with *autolim* = True. Note: there is no support for removing the artist's legend entry.
remove_callback(self, oid)
set(self, **kwargs)
A tkstyle set command, pass kwargs to set properties
set_alpha(self, alpha)
Set the alpha value used for blending - not supported on all backends ACCEPTS: float
set_animated(self, b)
set the artist's animation state ACCEPTS: [True | False]
set_axes(self, axes)
set the axes instance the artist resides in, if any ACCEPTS: an axes instance
set_clip_box(self, clipbox)
Set the artist's clip Bbox ACCEPTS: a matplotlib.transform.Bbox instance
set_clip_on(self, b)
Set whether artist uses clipping ACCEPTS: [True | False]
set_clip_path(self, clippath, transform=None)
set_contains(self, picker)
Replace the contains test used by this artist. The new picker should be a callable function which determines whether the artist is hit by the mouse event:: hit, props = picker(artist, mouseevent) If the mouse event is over the artist, return hit=True and props is a dictionary of properties you want returned with the contains test.
set_data_interval(self, vmin, vmax, ignore=False)
return the Interval instance for this axis data limits
set_figure(self, fig)
Set the :class:`~matplotlib.figure.Figure` instance the artist belongs to. ACCEPTS: a matplotlib.figure.Figure instance
set_label(self, s)
Set the line label to s for auto legend ACCEPTS: any string
set_label_coords(self, x, y, transform=None)
Set the coordinates of the label. By default, the x coordinate of the y label is determined by the tick label bounding boxes, but this can lead to poor alignment of multiple ylabels if there are multiple axes. Ditto for the y coodinate of the x label. 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 (left,bottom), (0.5, 0.5) is middle, etc
set_label_position(self, position)
Set the label position (left or right) ACCEPTS: [ 'left' | 'right' ]
set_lod(self, on)
Set Level of Detail on or off. If on, the artists may examine things like the pixel width of the axes and draw a subset of their contents accordingly ACCEPTS: [True | False]
set_major_formatter(self, formatter)
Set the formatter of the major ticker ACCEPTS: A Formatter instance
set_major_locator(self, locator)
Set the locator of the major ticker ACCEPTS: a Locator instance
set_minor_formatter(self, formatter)
Set the formatter of the minor ticker ACCEPTS: A Formatter instance
set_minor_locator(self, locator)
Set the locator of the minor ticker ACCEPTS: a Locator instance
set_offset_position(self, position)
set_picker(self, picker)
set the epsilon for picking used by this artist picker can be one of the following: None - picking is disabled for this artist (default) boolean - if True then picking will be enabled and the artist will fire a pick event if the mouse event is over the artist float - if picker is a number it is interpreted as an epsilon tolerance in points and the the artist will fire off an event if it's data is within epsilon of the mouse event. For some artists like lines and patch collections, the artist may provide additional data to the pick event that is generated, eg the indices of the data within epsilon of the pick event function - if picker is callable, it is a user supplied function which determines whether the artist is hit by the mouse event:: hit, props = picker(artist, mouseevent) to determine the hit test. if the mouse event is over the artist, return hit=True and props is a dictionary of properties you want added to the PickEvent attributes. ACCEPTS: [None|float|boolean|callable]
set_pickradius(self, pickradius)
Set the depth of the axis used by the picker ACCEPTS: a distance in points
set_scale(self, value, **kwargs)
set_ticklabels(self, ticklabels, *args, **kwargs)
Set the text values of the tick labels. Return a list of Text instances. Use kwarg minor=True to select minor ticks. ACCEPTS: sequence of strings
set_ticks(self, ticks, minor=False)
Set the locations of the tick marks from sequence ticks ACCEPTS: sequence of floats
set_ticks_position(self, position)
Set the ticks position (left, right, both or default) 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 on the left. ACCEPTS: [ 'left' | 'right' | 'both' | 'default' | 'none' ]
set_transform(self, t)
Set the :class:`~matplotlib.transforms.Transform` instance used by this artist.
set_units(self, u)
set the units for axis ACCEPTS: a units tag
set_view_interval(self, vmin, vmax, ignore=False)
set_visible(self, b)
set the artist's visiblity ACCEPTS: [True | False]
set_zorder(self, level)
Set the zorder for the artist ACCEPTS: any number
tick_left(self)
use ticks only on left
tick_right(self)
use ticks only on right
update(self, props)
update_from(self, other)
Copy properties from *other* to *self*.
update_units(self, data)
introspect data for units converter and update the axis.converter instance if necessary. Return true is data is registered for unit conversion
zoom(self, direction)
Zoom in/out on axis; if direction is >0 zoom in, else zoom out
  class YTick ( Tick )
Contains all the Artists needed to make a Y tick - the tick line, the label text and the grid line
add_callback(self, func)
contains(self, mouseevent)
Test whether the mouse event occured in the Tick marks. This function always returns false. It is more useful to test if the axis as a whole contains the mouse rather than the set of tick marks.
convert_xunits(self, x)
for artists in an axes, if the xaxis as units support, convert x using xaxis unit type
convert_yunits(self, y)
for artists in an axes, if the yaxis as units support, convert y using yaxis unit type
draw(self, renderer)
get_alpha(self)
Return the alpha value used for blending - not supported on all backends
get_animated(self)
return the artist's animated state
get_axes(self)
return the axes instance the artist resides in, or None
get_children(self)
get_clip_box(self)
Return artist clipbox
get_clip_on(self)
Return whether artist uses clipping
get_clip_path(self)
Return artist clip path
get_contains(self)
return the _contains test used by the artist, or None for default.
get_data_interval(self)
return the Interval instance for this axis data limits
get_figure(self)
Return the :class:`~matplotlib.figure.Figure` instance the artist belongs to.
get_label(self)
get_loc(self)
Return the tick location (data coords) as a scalar
get_minpos(self)
get_pad(self, val)
Get the value of the tick label pad in points
get_pad_pixels(self)
get_picker(self)
return the Pickeration instance used by this artist
get_transform(self)
Return the :class:`~matplotlib.transforms.Transform` instance used by this artist.
get_transformed_clip_path_and_affine(self)
Return the clip path with the non-affine part of its transformation applied, and the remaining affine part of its transformation.
get_view_interval(self)
return the Interval instance for this axis view limits
get_visible(self)
return the artist's visiblity
get_zorder(self)
have_units(self)
return True if units are set on the x or y axes
hitlist(self, event)
List the children of the artist which contain the mouse event
is_figure_set(self)
is_transform_set(self)
Artist has transform explicity let
pchanged(self)
fire event when property changed
pick(self, mouseevent)
pick(mouseevent) each child artist will fire a pick event if mouseevent is over the artist and the artist has picker set
pickable(self)
return True if self is pickable
remove(self)
Remove the artist from the figure if possible. The effect will not be visible until the figure is redrawn, e.g., with :meth:`matplotlib.axes.Axes.draw_idle`. Call :meth:`matplotlib.axes.Axes.relim` to update the axes limits if desired. Note: :meth:`~matplotlib.axes.Axes.relim` will not see collections even if the collection was added to axes with *autolim* = True. Note: there is no support for removing the artist's legend entry.
remove_callback(self, oid)
set(self, **kwargs)
A tkstyle set command, pass kwargs to set properties
set_alpha(self, alpha)
Set the alpha value used for blending - not supported on all backends ACCEPTS: float
set_animated(self, b)
set the artist's animation state ACCEPTS: [True | False]
set_axes(self, axes)
set the axes instance the artist resides in, if any ACCEPTS: an axes instance
set_clip_box(self, clipbox)
Set the artist's clip Bbox ACCEPTS: a matplotlib.transform.Bbox instance
set_clip_on(self, b)
Set whether artist uses clipping ACCEPTS: [True | False]
set_clip_path(self, clippath, transform=None)
Set the artist's clip path, which may be: a) a :class:`~matplotlib.patches.Patch` (or subclass) instance b) a :class:`~matplotlib.path.Path` instance, in which case an optional :class:`~matplotlib.transforms.Transform` instance may be provided, which will be applied to the path before using it for clipping. c) *None*, to remove the clipping path For efficiency, if the path happens to be an axis-aligned rectangle, this method will set the clipping box to the corresponding rectangle and set the clipping path to *None*. ACCEPTS: a Path instance and a Transform instance, a Patch instance, or None
set_contains(self, picker)
Replace the contains test used by this artist. The new picker should be a callable function which determines whether the artist is hit by the mouse event:: hit, props = picker(artist, mouseevent) If the mouse event is over the artist, return hit=True and props is a dictionary of properties you want returned with the contains test.
set_figure(self, fig)
Set the :class:`~matplotlib.figure.Figure` instance the artist belongs to. ACCEPTS: a matplotlib.figure.Figure instance
set_label1(self, s)
Set the text of ticklabel ACCEPTS: str
set_label1(self, s)
Set the text of ticklabel ACCEPTS: str
set_label2(self, s)
Set the text of ticklabel2 ACCEPTS: str
set_lod(self, on)
Set Level of Detail on or off. If on, the artists may examine things like the pixel width of the axes and draw a subset of their contents accordingly ACCEPTS: [True | False]
set_pad(self, val)
Set the tick label pad in points ACCEPTS: float
set_picker(self, picker)
set the epsilon for picking used by this artist picker can be one of the following: None - picking is disabled for this artist (default) boolean - if True then picking will be enabled and the artist will fire a pick event if the mouse event is over the artist float - if picker is a number it is interpreted as an epsilon tolerance in points and the the artist will fire off an event if it's data is within epsilon of the mouse event. For some artists like lines and patch collections, the artist may provide additional data to the pick event that is generated, eg the indices of the data within epsilon of the pick event function - if picker is callable, it is a user supplied function which determines whether the artist is hit by the mouse event:: hit, props = picker(artist, mouseevent) to determine the hit test. if the mouse event is over the artist, return hit=True and props is a dictionary of properties you want added to the PickEvent attributes. ACCEPTS: [None|float|boolean|callable]
set_transform(self, t)
Set the :class:`~matplotlib.transforms.Transform` instance used by this artist.
set_view_interval(self, vmin, vmax)
set_visible(self, b)
set the artist's visiblity ACCEPTS: [True | False]
set_zorder(self, level)
Set the zorder for the artist ACCEPTS: any number
update(self, props)
update_from(self, other)
Copy properties from *other* to *self*.
update_position(self, loc)
Set the location of tick in data coords with scalar loc
Document Actions
« September 2010 »
September
MoTuWeThFrSaSu
12345
6789101112
13141516171819
20212223242526
27282930
Log in


Forgot your password?
New user?