mpl_toolkits.axisartist.axis_artist.Ticks#
- class mpl_toolkits.axisartist.axis_artist.Ticks(ticksize, tick_out=<deprecated parameter>, *, axis=None, **kwargs)[source]#
Bases:
AttributeCopier,Line2DTicks are derived from
Line2D, and note that ticks themselves are markers. Thus, you should use set_mec, set_mew, etc.To change the tick size (length), use
set_ticksize. To change the direction of the ticks, useset_tick_direction("in")(or "out", or "inout").- draw(renderer)[source]#
Draw the Artist (and its children) using the given renderer.
This has no effect if the artist is not visible (
Artist.get_visiblereturns False).- Parameters:
- renderer
RendererBasesubclass.
- renderer
Notes
This method is overridden in the Artist subclasses.
- get_markeredgecolor()[source]#
Return the marker edge color.
See also
set_markeredgecolor.
- get_markeredgewidth()[source]#
Return the marker edge width in points.
See also
set_markeredgewidth.
- get_ref_artist()[source]#
Return the underlying artist that actually defines some properties (e.g., color) of this artist.
- get_tick_out()[source]#
[Deprecated] Return whether ticks are drawn inside or outside the axes.
Notes
Deprecated since version 3.11: Use get_tick_direction instead.
- set(*, agg_filter=<UNSET>, alpha=<UNSET>, animated=<UNSET>, antialiased=<UNSET>, clip_box=<UNSET>, clip_on=<UNSET>, clip_path=<UNSET>, color=<UNSET>, dash_capstyle=<UNSET>, dash_joinstyle=<UNSET>, dashes=<UNSET>, data=<UNSET>, drawstyle=<UNSET>, fillstyle=<UNSET>, gapcolor=<UNSET>, gid=<UNSET>, in_layout=<UNSET>, label=<UNSET>, linestyle=<UNSET>, linewidth=<UNSET>, locs_angles=<UNSET>, marker=<UNSET>, markeredgecolor=<UNSET>, markeredgewidth=<UNSET>, markerfacecolor=<UNSET>, markerfacecoloralt=<UNSET>, markersize=<UNSET>, markevery=<UNSET>, mouseover=<UNSET>, path_effects=<UNSET>, picker=<UNSET>, pickradius=<UNSET>, rasterized=<UNSET>, sketch_params=<UNSET>, snap=<UNSET>, solid_capstyle=<UNSET>, solid_joinstyle=<UNSET>, tick_direction=<UNSET>, tick_out=<UNSET>, ticksize=<UNSET>, transform=<UNSET>, url=<UNSET>, visible=<UNSET>, xdata=<UNSET>, ydata=<UNSET>, zorder=<UNSET>)[source]#
Set multiple properties at once.
a.set(a=A, b=B, c=C)
is equivalent to
a.set_a(A) a.set_b(B) a.set_c(C)
In addition to the full property names, aliases are also supported, e.g.
set(lw=2)is equivalent toset(linewidth=2), but it is an error to pass both simultaneously.The order of the individual setter calls matches the order of parameters in
set(). However, most properties do not depend on each other so that order is rarely relevant.Supported properties are
Property
Description
a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array and two offsets from the bottom left corner of the image
float or None
bool
antialiasedoraabool
BboxBaseor Nonebool
Patch or (Path, Transform) or None
unknown
CapStyleor {'butt', 'projecting', 'round'}JoinStyleor {'miter', 'round', 'bevel'}sequence of floats (on/off ink in points) or (None, None)
(2, N) array or two 1D arrays
{'default', 'steps', 'steps-pre', 'steps-mid', 'steps-post'}, default: 'default'
{'full', 'left', 'right', 'bottom', 'top', 'none'}
color or None
str
bool
object
{'-', '--', '-.', ':', '', ...} or (offset, on-off-seq)
float
unknown
marker style string,
PathorMarkerStylefloat
markersizeormsfloat
None or int or (int, int) or slice or list[int] or float or (float, float) or list[bool]
bool
list of
AbstractPathEffectfloat or callable[[Artist, Event], tuple[bool, dict]]
float
bool
(scale: float, length: float, randomness: float)
bool or None
CapStyleor {'butt', 'projecting', 'round'}JoinStyleor {'miter', 'round', 'bevel'}unknown
unknown
unknown
str
bool
1D array
1D array
float