doc_content stringlengths 1 386k | doc_id stringlengths 5 188 |
|---|---|
mpl_toolkits.axisartist The axisartist namespace provides a derived Axes implementation (mpl_toolkits.axisartist.Axes), designed to support curvilinear grids. The biggest difference is that the artists that are responsible for drawing axis lines, ticks, ticklabels, and axis labels are separated out from Matplotlib's Axis class. You can find a tutorial describing usage of axisartist at the axisartist user guide. The submodules of the axisartist API are:
axisartist.angle_helper
axisartist.axes_divider
axisartist.axes_grid
axisartist.axes_rgb
axisartist.axis_artist The axis_artist module implements custom artists to draw axis elements (axis lines and labels, tick lines and labels, grid lines).
axisartist.axisline_style
axisartist.axislines Axislines includes modified implementation of the Axes class.
axisartist.clip_path
axisartist.floating_axes An experimental support for curvilinear grid.
axisartist.grid_finder
axisartist.grid_helper_curvelinear An experimental support for curvilinear grid.
axisartist.parasite_axes | matplotlib.toolkits.axisartist |
mpl_toolkits.axisartist.angle_helper Classes
ExtremeFinderCycle(nx, ny[, lon_cycle, ...]) This subclass handles the case where one or both coordinates should be taken modulo 360, or be restricted to not exceed a specific range.
FormatterDMS()
FormatterHMS()
LocatorBase(nbins[, include_last])
LocatorD(nbins[, include_last])
LocatorDM(nbins[, include_last])
LocatorDMS(nbins[, include_last])
LocatorH(nbins[, include_last])
LocatorHM(nbins[, include_last])
LocatorHMS(nbins[, include_last]) Functions
select_step(v1, v2, nv[, hour, ...])
select_step24(v1, v2, nv[, include_last, ...])
select_step360(v1, v2, nv[, include_last, ...])
select_step_degree(dv)
select_step_hour(dv)
select_step_sub(dv) | matplotlib._as_gen.mpl_toolkits.axisartist.angle_helper |
mpl_toolkits.axisartist.angle_helper.ExtremeFinderCycle classmpl_toolkits.axisartist.angle_helper.ExtremeFinderCycle(nx, ny, lon_cycle=360.0, lat_cycle=None, lon_minmax=None, lat_minmax=(- 90, 90))[source]
Bases: mpl_toolkits.axisartist.grid_finder.ExtremeFinderSimple This subclass handles the case where one or both coordinates should be taken modulo 360, or be restricted to not exceed a specific range. Parameters
nx, nyint
The number of samples in each direction.
lon_cycle, lat_cycle360 or None
If not None, values in the corresponding direction are taken modulo lon_cycle or lat_cycle; in theory this can be any number but the implementation actually assumes that it is 360 (if not None); other values give nonsensical results. This is done by "unwrapping" the transformed grid coordinates so that jumps are less than a half-cycle; then normalizing the span to no more than a full cycle. For example, if values are in the union of the [0, 2] and [358, 360] intervals (typically, angles measured modulo 360), the values in the second interval are normalized to [-2, 0] instead so that the values now cover [-2, 2]. If values are in a range of [5, 1000], this gets normalized to [5, 365].
lon_minmax, lat_minmax(float, float) or None
If not None, the computed bounding box is clipped to the given range in the corresponding direction. __call__(transform_xy, x1, y1, x2, y2)[source]
Compute an approximation of the bounding box obtained by applying transform_xy to the box delimited by (x1, y1, x2, y2). The intended use is to have (x1, y1, x2, y2) in axes coordinates, and have transform_xy be the transform from axes coordinates to data coordinates; this method then returns the range of data coordinates that span the actual axes. The computation is done by sampling nx * ny equispaced points in the (x1, y1, x2, y2) box and finding the resulting points with extremal coordinates; then adding some padding to take into account the finite sampling. As each sampling step covers a relative range of 1/nx or 1/ny, the padding is computed by expanding the span covered by the extremal coordinates by these fractions.
Examples using mpl_toolkits.axisartist.angle_helper.ExtremeFinderCycle
axis_direction demo
Curvilinear grid demo
floating_axis demo
Simple Axis Pad | matplotlib._as_gen.mpl_toolkits.axisartist.angle_helper.extremefindercycle |
__call__(transform_xy, x1, y1, x2, y2)[source]
Compute an approximation of the bounding box obtained by applying transform_xy to the box delimited by (x1, y1, x2, y2). The intended use is to have (x1, y1, x2, y2) in axes coordinates, and have transform_xy be the transform from axes coordinates to data coordinates; this method then returns the range of data coordinates that span the actual axes. The computation is done by sampling nx * ny equispaced points in the (x1, y1, x2, y2) box and finding the resulting points with extremal coordinates; then adding some padding to take into account the finite sampling. As each sampling step covers a relative range of 1/nx or 1/ny, the padding is computed by expanding the span covered by the extremal coordinates by these fractions. | matplotlib._as_gen.mpl_toolkits.axisartist.angle_helper.extremefindercycle#mpl_toolkits.axisartist.angle_helper.ExtremeFinderCycle.__call__ |
mpl_toolkits.axisartist.angle_helper.FormatterDMS classmpl_toolkits.axisartist.angle_helper.FormatterDMS[source]
Bases: object __call__(direction, factor, values)[source]
Call self as a function.
deg_mark='^{\\circ}'
fmt_d='$%d^{\\circ}$'
fmt_d_m='$%s%d^{\\circ}\\,%02d^{\\prime}$'
fmt_d_m_partial='$%s%d^{\\circ}\\,%02d^{\\prime}\\,'
fmt_d_ms='$%s%d^{\\circ}\\,%02d.%s^{\\prime}$'
fmt_ds='$%d.%s^{\\circ}$'
fmt_s_partial='%02d^{\\prime\\prime}$'
fmt_ss_partial='%02d.%s^{\\prime\\prime}$'
min_mark='^{\\prime}'
sec_mark='^{\\prime\\prime}'
Examples using mpl_toolkits.axisartist.angle_helper.FormatterDMS
axis_direction demo
Curvilinear grid demo
mpl_toolkits.axisartist.floating_axes features
floating_axis demo
Simple Axis Pad | matplotlib._as_gen.mpl_toolkits.axisartist.angle_helper.formatterdms |
__call__(direction, factor, values)[source]
Call self as a function. | matplotlib._as_gen.mpl_toolkits.axisartist.angle_helper.formatterdms#mpl_toolkits.axisartist.angle_helper.FormatterDMS.__call__ |
deg_mark='^{\\circ}' | matplotlib._as_gen.mpl_toolkits.axisartist.angle_helper.formatterdms#mpl_toolkits.axisartist.angle_helper.FormatterDMS.deg_mark |
fmt_d='$%d^{\\circ}$' | matplotlib._as_gen.mpl_toolkits.axisartist.angle_helper.formatterdms#mpl_toolkits.axisartist.angle_helper.FormatterDMS.fmt_d |
fmt_d_m='$%s%d^{\\circ}\\,%02d^{\\prime}$' | matplotlib._as_gen.mpl_toolkits.axisartist.angle_helper.formatterdms#mpl_toolkits.axisartist.angle_helper.FormatterDMS.fmt_d_m |
fmt_d_m_partial='$%s%d^{\\circ}\\,%02d^{\\prime}\\,' | matplotlib._as_gen.mpl_toolkits.axisartist.angle_helper.formatterdms#mpl_toolkits.axisartist.angle_helper.FormatterDMS.fmt_d_m_partial |
fmt_d_ms='$%s%d^{\\circ}\\,%02d.%s^{\\prime}$' | matplotlib._as_gen.mpl_toolkits.axisartist.angle_helper.formatterdms#mpl_toolkits.axisartist.angle_helper.FormatterDMS.fmt_d_ms |
fmt_ds='$%d.%s^{\\circ}$' | matplotlib._as_gen.mpl_toolkits.axisartist.angle_helper.formatterdms#mpl_toolkits.axisartist.angle_helper.FormatterDMS.fmt_ds |
fmt_s_partial='%02d^{\\prime\\prime}$' | matplotlib._as_gen.mpl_toolkits.axisartist.angle_helper.formatterdms#mpl_toolkits.axisartist.angle_helper.FormatterDMS.fmt_s_partial |
fmt_ss_partial='%02d.%s^{\\prime\\prime}$' | matplotlib._as_gen.mpl_toolkits.axisartist.angle_helper.formatterdms#mpl_toolkits.axisartist.angle_helper.FormatterDMS.fmt_ss_partial |
min_mark='^{\\prime}' | matplotlib._as_gen.mpl_toolkits.axisartist.angle_helper.formatterdms#mpl_toolkits.axisartist.angle_helper.FormatterDMS.min_mark |
sec_mark='^{\\prime\\prime}' | matplotlib._as_gen.mpl_toolkits.axisartist.angle_helper.formatterdms#mpl_toolkits.axisartist.angle_helper.FormatterDMS.sec_mark |
mpl_toolkits.axisartist.angle_helper.FormatterHMS classmpl_toolkits.axisartist.angle_helper.FormatterHMS[source]
Bases: mpl_toolkits.axisartist.angle_helper.FormatterDMS __call__(direction, factor, values)[source]
Call self as a function.
deg_mark='^\\mathrm{h}'
fmt_d='$%d^\\mathrm{h}$'
fmt_d_m='$%s%d^\\mathrm{h}\\,%02d^\\mathrm{m}$'
fmt_d_m_partial='$%s%d^\\mathrm{h}\\,%02d^\\mathrm{m}\\,'
fmt_d_ms='$%s%d^\\mathrm{h}\\,%02d.%s^\\mathrm{m}$'
fmt_ds='$%d.%s^\\mathrm{h}$'
fmt_s_partial='%02d^\\mathrm{s}$'
fmt_ss_partial='%02d.%s^\\mathrm{s}$'
min_mark='^\\mathrm{m}'
sec_mark='^\\mathrm{s}'
Examples using mpl_toolkits.axisartist.angle_helper.FormatterHMS
mpl_toolkits.axisartist.floating_axes features | matplotlib._as_gen.mpl_toolkits.axisartist.angle_helper.formatterhms |
__call__(direction, factor, values)[source]
Call self as a function. | matplotlib._as_gen.mpl_toolkits.axisartist.angle_helper.formatterhms#mpl_toolkits.axisartist.angle_helper.FormatterHMS.__call__ |
deg_mark='^\\mathrm{h}' | matplotlib._as_gen.mpl_toolkits.axisartist.angle_helper.formatterhms#mpl_toolkits.axisartist.angle_helper.FormatterHMS.deg_mark |
fmt_d='$%d^\\mathrm{h}$' | matplotlib._as_gen.mpl_toolkits.axisartist.angle_helper.formatterhms#mpl_toolkits.axisartist.angle_helper.FormatterHMS.fmt_d |
fmt_d_m='$%s%d^\\mathrm{h}\\,%02d^\\mathrm{m}$' | matplotlib._as_gen.mpl_toolkits.axisartist.angle_helper.formatterhms#mpl_toolkits.axisartist.angle_helper.FormatterHMS.fmt_d_m |
fmt_d_m_partial='$%s%d^\\mathrm{h}\\,%02d^\\mathrm{m}\\,' | matplotlib._as_gen.mpl_toolkits.axisartist.angle_helper.formatterhms#mpl_toolkits.axisartist.angle_helper.FormatterHMS.fmt_d_m_partial |
fmt_d_ms='$%s%d^\\mathrm{h}\\,%02d.%s^\\mathrm{m}$' | matplotlib._as_gen.mpl_toolkits.axisartist.angle_helper.formatterhms#mpl_toolkits.axisartist.angle_helper.FormatterHMS.fmt_d_ms |
fmt_ds='$%d.%s^\\mathrm{h}$' | matplotlib._as_gen.mpl_toolkits.axisartist.angle_helper.formatterhms#mpl_toolkits.axisartist.angle_helper.FormatterHMS.fmt_ds |
fmt_s_partial='%02d^\\mathrm{s}$' | matplotlib._as_gen.mpl_toolkits.axisartist.angle_helper.formatterhms#mpl_toolkits.axisartist.angle_helper.FormatterHMS.fmt_s_partial |
fmt_ss_partial='%02d.%s^\\mathrm{s}$' | matplotlib._as_gen.mpl_toolkits.axisartist.angle_helper.formatterhms#mpl_toolkits.axisartist.angle_helper.FormatterHMS.fmt_ss_partial |
min_mark='^\\mathrm{m}' | matplotlib._as_gen.mpl_toolkits.axisartist.angle_helper.formatterhms#mpl_toolkits.axisartist.angle_helper.FormatterHMS.min_mark |
sec_mark='^\\mathrm{s}' | matplotlib._as_gen.mpl_toolkits.axisartist.angle_helper.formatterhms#mpl_toolkits.axisartist.angle_helper.FormatterHMS.sec_mark |
mpl_toolkits.axisartist.angle_helper.LocatorBase classmpl_toolkits.axisartist.angle_helper.LocatorBase(nbins, include_last=True)[source]
Bases: object set_params(nbins=None)[source]
Examples using mpl_toolkits.axisartist.angle_helper.LocatorBase
axis_direction demo
Curvilinear grid demo
mpl_toolkits.axisartist.floating_axes features
floating_axis demo
Simple Axis Pad | matplotlib._as_gen.mpl_toolkits.axisartist.angle_helper.locatorbase |
set_params(nbins=None)[source] | matplotlib._as_gen.mpl_toolkits.axisartist.angle_helper.locatorbase#mpl_toolkits.axisartist.angle_helper.LocatorBase.set_params |
mpl_toolkits.axisartist.angle_helper.LocatorD classmpl_toolkits.axisartist.angle_helper.LocatorD(nbins, include_last=True)[source]
Bases: mpl_toolkits.axisartist.angle_helper.LocatorBase __call__(v1, v2)[source]
Call self as a function. | matplotlib._as_gen.mpl_toolkits.axisartist.angle_helper.locatord |
__call__(v1, v2)[source]
Call self as a function. | matplotlib._as_gen.mpl_toolkits.axisartist.angle_helper.locatord#mpl_toolkits.axisartist.angle_helper.LocatorD.__call__ |
mpl_toolkits.axisartist.angle_helper.LocatorDM classmpl_toolkits.axisartist.angle_helper.LocatorDM(nbins, include_last=True)[source]
Bases: mpl_toolkits.axisartist.angle_helper.LocatorBase __call__(v1, v2)[source]
Call self as a function. | matplotlib._as_gen.mpl_toolkits.axisartist.angle_helper.locatordm |
__call__(v1, v2)[source]
Call self as a function. | matplotlib._as_gen.mpl_toolkits.axisartist.angle_helper.locatordm#mpl_toolkits.axisartist.angle_helper.LocatorDM.__call__ |
mpl_toolkits.axisartist.angle_helper.LocatorDMS classmpl_toolkits.axisartist.angle_helper.LocatorDMS(nbins, include_last=True)[source]
Bases: mpl_toolkits.axisartist.angle_helper.LocatorBase __call__(v1, v2)[source]
Call self as a function.
Examples using mpl_toolkits.axisartist.angle_helper.LocatorDMS
axis_direction demo
Curvilinear grid demo
floating_axis demo
Simple Axis Pad | matplotlib._as_gen.mpl_toolkits.axisartist.angle_helper.locatordms |
__call__(v1, v2)[source]
Call self as a function. | matplotlib._as_gen.mpl_toolkits.axisartist.angle_helper.locatordms#mpl_toolkits.axisartist.angle_helper.LocatorDMS.__call__ |
mpl_toolkits.axisartist.angle_helper.LocatorH classmpl_toolkits.axisartist.angle_helper.LocatorH(nbins, include_last=True)[source]
Bases: mpl_toolkits.axisartist.angle_helper.LocatorBase __call__(v1, v2)[source]
Call self as a function. | matplotlib._as_gen.mpl_toolkits.axisartist.angle_helper.locatorh |
__call__(v1, v2)[source]
Call self as a function. | matplotlib._as_gen.mpl_toolkits.axisartist.angle_helper.locatorh#mpl_toolkits.axisartist.angle_helper.LocatorH.__call__ |
mpl_toolkits.axisartist.angle_helper.LocatorHM classmpl_toolkits.axisartist.angle_helper.LocatorHM(nbins, include_last=True)[source]
Bases: mpl_toolkits.axisartist.angle_helper.LocatorBase __call__(v1, v2)[source]
Call self as a function. | matplotlib._as_gen.mpl_toolkits.axisartist.angle_helper.locatorhm |
__call__(v1, v2)[source]
Call self as a function. | matplotlib._as_gen.mpl_toolkits.axisartist.angle_helper.locatorhm#mpl_toolkits.axisartist.angle_helper.LocatorHM.__call__ |
mpl_toolkits.axisartist.angle_helper.LocatorHMS classmpl_toolkits.axisartist.angle_helper.LocatorHMS(nbins, include_last=True)[source]
Bases: mpl_toolkits.axisartist.angle_helper.LocatorBase __call__(v1, v2)[source]
Call self as a function.
Examples using mpl_toolkits.axisartist.angle_helper.LocatorHMS
mpl_toolkits.axisartist.floating_axes features | matplotlib._as_gen.mpl_toolkits.axisartist.angle_helper.locatorhms |
__call__(v1, v2)[source]
Call self as a function. | matplotlib._as_gen.mpl_toolkits.axisartist.angle_helper.locatorhms#mpl_toolkits.axisartist.angle_helper.LocatorHMS.__call__ |
mpl_toolkits.axisartist.angle_helper.select_step mpl_toolkits.axisartist.angle_helper.select_step(v1, v2, nv, hour=False, include_last=True, threshold_factor=3600.0)[source] | matplotlib._as_gen.mpl_toolkits.axisartist.angle_helper.select_step |
mpl_toolkits.axisartist.angle_helper.select_step24 mpl_toolkits.axisartist.angle_helper.select_step24(v1, v2, nv, include_last=True, threshold_factor=3600)[source] | matplotlib._as_gen.mpl_toolkits.axisartist.angle_helper.select_step24 |
mpl_toolkits.axisartist.angle_helper.select_step360 mpl_toolkits.axisartist.angle_helper.select_step360(v1, v2, nv, include_last=True, threshold_factor=3600)[source] | matplotlib._as_gen.mpl_toolkits.axisartist.angle_helper.select_step360 |
mpl_toolkits.axisartist.angle_helper.select_step_degree mpl_toolkits.axisartist.angle_helper.select_step_degree(dv)[source] | matplotlib._as_gen.mpl_toolkits.axisartist.angle_helper.select_step_degree |
mpl_toolkits.axisartist.angle_helper.select_step_hour mpl_toolkits.axisartist.angle_helper.select_step_hour(dv)[source] | matplotlib._as_gen.mpl_toolkits.axisartist.angle_helper.select_step_hour |
mpl_toolkits.axisartist.angle_helper.select_step_sub mpl_toolkits.axisartist.angle_helper.select_step_sub(dv)[source] | matplotlib._as_gen.mpl_toolkits.axisartist.angle_helper.select_step_sub |
mpl_toolkits.axisartist.axes_divider | matplotlib._as_gen.mpl_toolkits.axisartist.axes_divider |
mpl_toolkits.axisartist.axes_grid Classes
AxesGrid alias of mpl_toolkits.axisartist.axes_grid.ImageGrid
CbarAxes(*args, orientation, **kwargs) [Deprecated]
Grid(fig, rect, nrows_ncols[, ngrids, ...])
Parameters
ImageGrid(fig, rect, nrows_ncols[, ngrids, ...])
Parameters | matplotlib._as_gen.mpl_toolkits.axisartist.axes_grid |
mpl_toolkits.axisartist.axes_grid.AxesGrid mpl_toolkits.axisartist.axes_grid.AxesGrid[source]
alias of mpl_toolkits.axisartist.axes_grid.ImageGrid | matplotlib._as_gen.mpl_toolkits.axisartist.axes_grid.axesgrid |
mpl_toolkits.axisartist.axes_grid.CbarAxes classmpl_toolkits.axisartist.axes_grid.CbarAxes(*args, orientation, **kwargs)[source]
Bases: mpl_toolkits.axes_grid1.axes_grid.CbarAxesBase, mpl_toolkits.axisartist.axislines.Axes [Deprecated] Notes Deprecated since version 3.5: Build an Axes in a figure. Parameters
figFigure
The Axes is built in the Figure fig.
rect[left, bottom, width, height]
The Axes is built in the rectangle rect. rect is in Figure coordinates.
sharex, shareyAxes, optional
The x or y axis is shared with the x or y axis in the input Axes.
frameonbool, default: True
Whether the Axes frame is visible.
box_aspectfloat, optional
Set a fixed aspect for the Axes box, i.e. the ratio of height to width. See set_box_aspect for details. **kwargs
Other optional keyword arguments:
Property Description
adjustable {'box', 'datalim'}
agg_filter a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array
alpha scalar or None
anchor (float, float) or {'C', 'SW', 'S', 'SE', 'E', 'NE', ...}
animated bool
aspect {'auto', 'equal'} or float
autoscale_on bool
autoscalex_on bool
autoscaley_on bool
axes_locator Callable[[Axes, Renderer], Bbox]
axisbelow bool or 'line'
box_aspect float or None
clip_box Bbox
clip_on bool
clip_path Patch or (Path, Transform) or None
facecolor or fc color
figure Figure
frame_on bool
gid str
in_layout bool
label object
navigate bool
navigate_mode unknown
path_effects AbstractPathEffect
picker None or bool or float or callable
position [left, bottom, width, height] or Bbox
prop_cycle unknown
rasterization_zorder float or None
rasterized bool
sketch_params (scale: float, length: float, randomness: float)
snap bool or None
title str
transform Transform
url str
visible bool
xbound unknown
xlabel str
xlim (bottom: float, top: float)
xmargin float greater than -0.5
xscale {"linear", "log", "symlog", "logit", ...} or ScaleBase
xticklabels unknown
xticks unknown
ybound unknown
ylabel str
ylim (bottom: float, top: float)
ymargin float greater than -0.5
yscale {"linear", "log", "symlog", "logit", ...} or ScaleBase
yticklabels unknown
yticks unknown
zorder float Returns
Axes
The new Axes object. set(*, adjustable=<UNSET>, agg_filter=<UNSET>, alpha=<UNSET>, anchor=<UNSET>, animated=<UNSET>, aspect=<UNSET>, autoscale_on=<UNSET>, autoscalex_on=<UNSET>, autoscaley_on=<UNSET>, axes_locator=<UNSET>, axisbelow=<UNSET>, box_aspect=<UNSET>, clip_box=<UNSET>, clip_on=<UNSET>, clip_path=<UNSET>, facecolor=<UNSET>, frame_on=<UNSET>, gid=<UNSET>, in_layout=<UNSET>, label=<UNSET>, navigate=<UNSET>, path_effects=<UNSET>, picker=<UNSET>, position=<UNSET>, prop_cycle=<UNSET>, rasterization_zorder=<UNSET>, rasterized=<UNSET>, sketch_params=<UNSET>, snap=<UNSET>, title=<UNSET>, transform=<UNSET>, url=<UNSET>, visible=<UNSET>, xbound=<UNSET>, xlabel=<UNSET>, xlim=<UNSET>, xmargin=<UNSET>, xscale=<UNSET>, xticklabels=<UNSET>, xticks=<UNSET>, ybound=<UNSET>, ylabel=<UNSET>, ylim=<UNSET>, ymargin=<UNSET>, yscale=<UNSET>, yticklabels=<UNSET>, yticks=<UNSET>, zorder=<UNSET>)[source]
Set multiple properties at once. Supported properties are
Property Description
adjustable {'box', 'datalim'}
agg_filter a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array
alpha scalar or None
anchor (float, float) or {'C', 'SW', 'S', 'SE', 'E', 'NE', ...}
animated bool
aspect {'auto', 'equal'} or float
autoscale_on bool
autoscalex_on bool
autoscaley_on bool
axes_locator Callable[[Axes, Renderer], Bbox]
axisbelow bool or 'line'
box_aspect float or None
clip_box Bbox
clip_on bool
clip_path Patch or (Path, Transform) or None
facecolor or fc color
figure Figure
frame_on bool
gid str
in_layout bool
label object
navigate bool
navigate_mode unknown
path_effects AbstractPathEffect
picker None or bool or float or callable
position [left, bottom, width, height] or Bbox
prop_cycle unknown
rasterization_zorder float or None
rasterized bool
sketch_params (scale: float, length: float, randomness: float)
snap bool or None
title str
transform Transform
url str
visible bool
xbound unknown
xlabel str
xlim (bottom: float, top: float)
xmargin float greater than -0.5
xscale {"linear", "log", "symlog", "logit", ...} or ScaleBase
xticklabels unknown
xticks unknown
ybound unknown
ylabel str
ylim (bottom: float, top: float)
ymargin float greater than -0.5
yscale {"linear", "log", "symlog", "logit", ...} or ScaleBase
yticklabels unknown
yticks unknown
zorder float | matplotlib._as_gen.mpl_toolkits.axisartist.axes_grid.cbaraxes |
set(*, adjustable=<UNSET>, agg_filter=<UNSET>, alpha=<UNSET>, anchor=<UNSET>, animated=<UNSET>, aspect=<UNSET>, autoscale_on=<UNSET>, autoscalex_on=<UNSET>, autoscaley_on=<UNSET>, axes_locator=<UNSET>, axisbelow=<UNSET>, box_aspect=<UNSET>, clip_box=<UNSET>, clip_on=<UNSET>, clip_path=<UNSET>, facecolor=<UNSET>, frame_on=<UNSET>, gid=<UNSET>, in_layout=<UNSET>, label=<UNSET>, navigate=<UNSET>, path_effects=<UNSET>, picker=<UNSET>, position=<UNSET>, prop_cycle=<UNSET>, rasterization_zorder=<UNSET>, rasterized=<UNSET>, sketch_params=<UNSET>, snap=<UNSET>, title=<UNSET>, transform=<UNSET>, url=<UNSET>, visible=<UNSET>, xbound=<UNSET>, xlabel=<UNSET>, xlim=<UNSET>, xmargin=<UNSET>, xscale=<UNSET>, xticklabels=<UNSET>, xticks=<UNSET>, ybound=<UNSET>, ylabel=<UNSET>, ylim=<UNSET>, ymargin=<UNSET>, yscale=<UNSET>, yticklabels=<UNSET>, yticks=<UNSET>, zorder=<UNSET>)[source]
Set multiple properties at once. Supported properties are
Property Description
adjustable {'box', 'datalim'}
agg_filter a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array
alpha scalar or None
anchor (float, float) or {'C', 'SW', 'S', 'SE', 'E', 'NE', ...}
animated bool
aspect {'auto', 'equal'} or float
autoscale_on bool
autoscalex_on bool
autoscaley_on bool
axes_locator Callable[[Axes, Renderer], Bbox]
axisbelow bool or 'line'
box_aspect float or None
clip_box Bbox
clip_on bool
clip_path Patch or (Path, Transform) or None
facecolor or fc color
figure Figure
frame_on bool
gid str
in_layout bool
label object
navigate bool
navigate_mode unknown
path_effects AbstractPathEffect
picker None or bool or float or callable
position [left, bottom, width, height] or Bbox
prop_cycle unknown
rasterization_zorder float or None
rasterized bool
sketch_params (scale: float, length: float, randomness: float)
snap bool or None
title str
transform Transform
url str
visible bool
xbound unknown
xlabel str
xlim (bottom: float, top: float)
xmargin float greater than -0.5
xscale {"linear", "log", "symlog", "logit", ...} or ScaleBase
xticklabels unknown
xticks unknown
ybound unknown
ylabel str
ylim (bottom: float, top: float)
ymargin float greater than -0.5
yscale {"linear", "log", "symlog", "logit", ...} or ScaleBase
yticklabels unknown
yticks unknown
zorder float | matplotlib._as_gen.mpl_toolkits.axisartist.axes_grid.cbaraxes#mpl_toolkits.axisartist.axes_grid.CbarAxes.set |
mpl_toolkits.axisartist.axes_grid.Grid classmpl_toolkits.axisartist.axes_grid.Grid(fig, rect, nrows_ncols, ngrids=None, direction='row', axes_pad=0.02, *, share_all=False, share_x=True, share_y=True, label_mode='L', axes_class=None, aspect=False)[source]
Bases: mpl_toolkits.axes_grid1.axes_grid.Grid Parameters
figFigure
The parent figure.
rect(float, float, float, float) or int
The axes position, as a (left, bottom, width, height) tuple or as a three-digit subplot position code (e.g., "121").
nrows_ncols(int, int)
Number of rows and columns in the grid.
ngridsint or None, default: None
If not None, only the first ngrids axes in the grid are created.
direction{"row", "column"}, default: "row"
Whether axes are created in row-major ("row by row") or column-major order ("column by column"). This also affects the order in which axes are accessed using indexing (grid[index]).
axes_padfloat or (float, float), default: 0.02
Padding or (horizontal padding, vertical padding) between axes, in inches.
share_allbool, default: False
Whether all axes share their x- and y-axis. Overrides share_x and share_y.
share_xbool, default: True
Whether all axes of a column share their x-axis.
share_ybool, default: True
Whether all axes of a row share their y-axis.
label_mode{"L", "1", "all"}, default: "L"
Determines which axes will get tick labels: "L": All axes on the left column get vertical tick labels; all axes on the bottom row get horizontal tick labels. "1": Only the bottom left axes is labelled. "all": all axes are labelled.
axes_classsubclass of matplotlib.axes.Axes, default: None
aspectbool, default: False
Whether the axes aspect ratio follows the aspect ratio of the data limits. | matplotlib._as_gen.mpl_toolkits.axisartist.axes_grid.grid |
mpl_toolkits.axisartist.axes_grid.ImageGrid classmpl_toolkits.axisartist.axes_grid.ImageGrid(fig, rect, nrows_ncols, ngrids=None, direction='row', axes_pad=0.02, *, share_all=False, aspect=True, label_mode='L', cbar_mode=None, cbar_location='right', cbar_pad=None, cbar_size='5%', cbar_set_cax=True, axes_class=None)[source]
Bases: mpl_toolkits.axes_grid1.axes_grid.ImageGrid Parameters
figFigure
The parent figure.
rect(float, float, float, float) or int
The axes position, as a (left, bottom, width, height) tuple or as a three-digit subplot position code (e.g., "121").
nrows_ncols(int, int)
Number of rows and columns in the grid.
ngridsint or None, default: None
If not None, only the first ngrids axes in the grid are created.
direction{"row", "column"}, default: "row"
Whether axes are created in row-major ("row by row") or column-major order ("column by column"). This also affects the order in which axes are accessed using indexing (grid[index]).
axes_padfloat or (float, float), default: 0.02in
Padding or (horizontal padding, vertical padding) between axes, in inches.
share_allbool, default: False
Whether all axes share their x- and y-axis.
aspectbool, default: True
Whether the axes aspect ratio follows the aspect ratio of the data limits.
label_mode{"L", "1", "all"}, default: "L"
Determines which axes will get tick labels: "L": All axes on the left column get vertical tick labels; all axes on the bottom row get horizontal tick labels. "1": Only the bottom left axes is labelled. "all": all axes are labelled.
cbar_mode{"each", "single", "edge", None}, default: None
Whether to create a colorbar for "each" axes, a "single" colorbar for the entire grid, colorbars only for axes on the "edge" determined by cbar_location, or no colorbars. The colorbars are stored in the cbar_axes attribute.
cbar_location{"left", "right", "bottom", "top"}, default: "right"
cbar_padfloat, default: None
Padding between the image axes and the colorbar axes.
cbar_sizesize specification (see Size.from_any), default: "5%"
Colorbar size.
cbar_set_caxbool, default: True
If True, each axes in the grid has a cax attribute that is bound to associated cbar_axes.
axes_classsubclass of matplotlib.axes.Axes, default: None | matplotlib._as_gen.mpl_toolkits.axisartist.axes_grid.imagegrid |
mpl_toolkits.axisartist.axes_rgb Classes
RGBAxes(*args[, pad])
Parameters | matplotlib._as_gen.mpl_toolkits.axisartist.axes_rgb |
mpl_toolkits.axisartist.axes_rgb.RGBAxes classmpl_toolkits.axisartist.axes_rgb.RGBAxes(*args, pad=0, **kwargs)[source]
Bases: mpl_toolkits.axes_grid1.axes_rgb.RGBAxes Parameters
padfloat, default: 0
fraction of the axes height to put as padding.
axes_classmatplotlib.axes.Axes
*args
Unpacked into axes_class() init for RGB **kwargs
Unpacked into axes_class() init for RGB, R, G, B axes | matplotlib._as_gen.mpl_toolkits.axisartist.axes_rgb.rgbaxes |
mpl_toolkits.axisartist.axis_artist The axis_artist module implements custom artists to draw axis elements (axis lines and labels, tick lines and labels, grid lines). Axis lines and labels and tick lines and labels are managed by the AxisArtist class; grid lines are managed by the GridlinesCollection class. There is one AxisArtist per Axis; it can be accessed through the axis dictionary of the parent Axes (which should be a mpl_toolkits.axislines.Axes), e.g. ax.axis["bottom"]. Children of the AxisArtist are accessed as attributes: .line and .label for the axis line and label, .major_ticks, .major_ticklabels, .minor_ticks, .minor_ticklabels for the tick lines and labels (e.g. ax.axis["bottom"].line). Children properties (colors, fonts, line widths, etc.) can be set using setters, e.g. # Make the major ticks of the bottom axis red.
ax.axis["bottom"].major_ticks.set_color("red")
However, things like the locations of ticks, and their ticklabels need to be changed from the side of the grid_helper. axis_direction AxisArtist, AxisLabel, TickLabels have an axis_direction attribute, which adjusts the location, angle, etc. The axis_direction must be one of "left", "right", "bottom", "top", and follows the Matplotlib convention for rectangular axis. For example, for the bottom axis (the left and right is relative to the direction of the increasing coordinate), ticklabels and axislabel are on the right ticklabels and axislabel have text angle of 0 ticklabels are baseline, center-aligned axislabel is top, center-aligned The text angles are actually relative to (90 + angle of the direction to the ticklabel), which gives 0 for bottom axis.
Parameter left bottom right top
ticklabels location left right right left
axislabel location left right right left
ticklabels angle 90 0 -90 180
axislabel angle 180 0 0 180
ticklabel va center baseline center baseline
axislabel va center top center bottom
ticklabel ha right center right center
axislabel ha right center right center Ticks are by default direct opposite side of the ticklabels. To make ticks to the same side of the ticklabels, ax.axis["bottom"].major_ticks.set_tick_out(True)
The following attributes can be customized (use the set_xxx methods):
Ticks: ticksize, tick_out
TickLabels: pad
AxisLabel: pad Classes
AttributeCopier()
AxisArtist(axes, helper[, offset, ...]) An artist which draws axis (a line along which the n-th axes coord is constant) line, ticks, ticklabels, and axis label.
AxisLabel(*args[, axis_direction, axis]) Axis Label.
GridlinesCollection(*args[, which, axis])
Parameters
LabelBase(*args, **kwargs) A base class for AxisLabel and TickLabels.
TickLabels(*[, axis_direction]) Tick Labels.
Ticks(ticksize[, tick_out, axis]) Ticks are derived from Line2D, and note that ticks themselves are markers. | matplotlib._as_gen.mpl_toolkits.axisartist.axis_artist |
mpl_toolkits.axisartist.axis_artist.AttributeCopier classmpl_toolkits.axisartist.axis_artist.AttributeCopier[source]
Bases: object get_attribute_from_ref_artist(attr_name)[source]
get_ref_artist()[source]
Return the underlying artist that actually defines some properties (e.g., color) of this artist. | matplotlib._as_gen.mpl_toolkits.axisartist.axis_artist.attributecopier |
get_attribute_from_ref_artist(attr_name)[source] | matplotlib._as_gen.mpl_toolkits.axisartist.axis_artist.attributecopier#mpl_toolkits.axisartist.axis_artist.AttributeCopier.get_attribute_from_ref_artist |
get_ref_artist()[source]
Return the underlying artist that actually defines some properties (e.g., color) of this artist. | matplotlib._as_gen.mpl_toolkits.axisartist.axis_artist.attributecopier#mpl_toolkits.axisartist.axis_artist.AttributeCopier.get_ref_artist |
mpl_toolkits.axisartist.axis_artist.AxisArtist classmpl_toolkits.axisartist.axis_artist.AxisArtist(axes, helper, offset=None, axis_direction='bottom', **kwargs)[source]
Bases: matplotlib.artist.Artist An artist which draws axis (a line along which the n-th axes coord is constant) line, ticks, ticklabels, and axis label. Parameters
axesmpl_toolkits.axisartist.axislines.Axes
helperAxisArtistHelper
propertyLABELPAD
ZORDER=2.5
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_visible returns False). Parameters
rendererRendererBase subclass.
Notes This method is overridden in the Artist subclasses.
get_axisline_style()[source]
Return the current axisline style.
get_helper()[source]
Return axis artist helper instance.
get_tightbbox(renderer)[source]
Like Artist.get_window_extent, but includes any clipping. Parameters
rendererRendererBase subclass
renderer that will be used to draw the figures (i.e. fig.canvas.get_renderer()) Returns
Bbox
The enclosing bounding box (in figure pixel coordinates).
get_transform()[source]
Return the Transform instance used by this artist.
invert_ticklabel_direction()[source]
set(*, agg_filter=<UNSET>, alpha=<UNSET>, animated=<UNSET>, axis_direction=<UNSET>, axislabel_direction=<UNSET>, axisline_style=<UNSET>, clip_box=<UNSET>, clip_on=<UNSET>, clip_path=<UNSET>, gid=<UNSET>, in_layout=<UNSET>, label=<UNSET>, path_effects=<UNSET>, picker=<UNSET>, rasterized=<UNSET>, sketch_params=<UNSET>, snap=<UNSET>, ticklabel_direction=<UNSET>, transform=<UNSET>, url=<UNSET>, visible=<UNSET>, zorder=<UNSET>)[source]
Set multiple properties at once. Supported properties are
Property Description
agg_filter a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array
alpha scalar or None
animated bool
axis_direction unknown
axislabel_direction {"+", "-"}
axisline_style str or None
clip_box Bbox
clip_on bool
clip_path Patch or (Path, Transform) or None
figure Figure
gid str
in_layout bool
label unknown
path_effects AbstractPathEffect
picker None or bool or float or callable
rasterized bool
sketch_params (scale: float, length: float, randomness: float)
snap bool or None
ticklabel_direction {"+", "-"}
transform Transform
url str
visible bool
zorder float
set_axis_direction(axis_direction)[source]
Adjust the direction, text angle, text alignment of ticklabels, labels following the matplotlib convention for the rectangle axes. The axis_direction must be one of [left, right, bottom, top].
property left bottom right top
ticklabels location "-" "+" "+" "-"
axislabel location "-" "+" "+" "-"
ticklabels angle 90 0 -90 180
ticklabel va center baseline center baseline
ticklabel ha right center right center
axislabel angle 180 0 0 180
axislabel va center top center bottom
axislabel ha right center right center Note that the direction "+" and "-" are relative to the direction of the increasing coordinate. Also, the text angles are actually relative to (90 + angle of the direction to the ticklabel), which gives 0 for bottom axis.
set_axislabel_direction(label_direction)[source]
Adjust the direction of the axislabel. Note that the label_directions '+' and '-' are relative to the direction of the increasing coordinate. Parameters
label_direction{"+", "-"}
set_axisline_style(axisline_style=None, **kwargs)[source]
Set the axisline style. The new style is completely defined by the passed attributes. Existing style attributes are forgotten. Parameters
axisline_stylestr or None
The line style, e.g. '->', optionally followed by a comma-separated list of attributes. Alternatively, the attributes can be provided as keywords. If None this returns a string containing the available styles. Examples The following two commands are equal: >>> set_axisline_style("->,size=1.5") >>> set_axisline_style("->", size=1.5)
set_label(s)[source]
Set a label that will be displayed in the legend. Parameters
sobject
s will be converted to a string by calling str.
set_ticklabel_direction(tick_direction)[source]
Adjust the direction of the ticklabel. Note that the label_directions '+' and '-' are relative to the direction of the increasing coordinate. Parameters
tick_direction{"+", "-"}
toggle(all=None, ticks=None, ticklabels=None, label=None)[source]
Toggle visibility of ticks, ticklabels, and (axis) label. To turn all off, axis.toggle(all=False)
To turn all off but ticks on axis.toggle(all=False, ticks=True)
To turn all on but (axis) label off axis.toggle(all=True, label=False))
zorder=2.5 | matplotlib._as_gen.mpl_toolkits.axisartist.axis_artist.axisartist |
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_visible returns False). Parameters
rendererRendererBase subclass.
Notes This method is overridden in the Artist subclasses. | matplotlib._as_gen.mpl_toolkits.axisartist.axis_artist.axisartist#mpl_toolkits.axisartist.axis_artist.AxisArtist.draw |
get_axisline_style()[source]
Return the current axisline style. | matplotlib._as_gen.mpl_toolkits.axisartist.axis_artist.axisartist#mpl_toolkits.axisartist.axis_artist.AxisArtist.get_axisline_style |
get_helper()[source]
Return axis artist helper instance. | matplotlib._as_gen.mpl_toolkits.axisartist.axis_artist.axisartist#mpl_toolkits.axisartist.axis_artist.AxisArtist.get_helper |
get_tightbbox(renderer)[source]
Like Artist.get_window_extent, but includes any clipping. Parameters
rendererRendererBase subclass
renderer that will be used to draw the figures (i.e. fig.canvas.get_renderer()) Returns
Bbox
The enclosing bounding box (in figure pixel coordinates). | matplotlib._as_gen.mpl_toolkits.axisartist.axis_artist.axisartist#mpl_toolkits.axisartist.axis_artist.AxisArtist.get_tightbbox |
get_transform()[source]
Return the Transform instance used by this artist. | matplotlib._as_gen.mpl_toolkits.axisartist.axis_artist.axisartist#mpl_toolkits.axisartist.axis_artist.AxisArtist.get_transform |
invert_ticklabel_direction()[source] | matplotlib._as_gen.mpl_toolkits.axisartist.axis_artist.axisartist#mpl_toolkits.axisartist.axis_artist.AxisArtist.invert_ticklabel_direction |
set(*, agg_filter=<UNSET>, alpha=<UNSET>, animated=<UNSET>, axis_direction=<UNSET>, axislabel_direction=<UNSET>, axisline_style=<UNSET>, clip_box=<UNSET>, clip_on=<UNSET>, clip_path=<UNSET>, gid=<UNSET>, in_layout=<UNSET>, label=<UNSET>, path_effects=<UNSET>, picker=<UNSET>, rasterized=<UNSET>, sketch_params=<UNSET>, snap=<UNSET>, ticklabel_direction=<UNSET>, transform=<UNSET>, url=<UNSET>, visible=<UNSET>, zorder=<UNSET>)[source]
Set multiple properties at once. Supported properties are
Property Description
agg_filter a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array
alpha scalar or None
animated bool
axis_direction unknown
axislabel_direction {"+", "-"}
axisline_style str or None
clip_box Bbox
clip_on bool
clip_path Patch or (Path, Transform) or None
figure Figure
gid str
in_layout bool
label unknown
path_effects AbstractPathEffect
picker None or bool or float or callable
rasterized bool
sketch_params (scale: float, length: float, randomness: float)
snap bool or None
ticklabel_direction {"+", "-"}
transform Transform
url str
visible bool
zorder float | matplotlib._as_gen.mpl_toolkits.axisartist.axis_artist.axisartist#mpl_toolkits.axisartist.axis_artist.AxisArtist.set |
set_axis_direction(axis_direction)[source]
Adjust the direction, text angle, text alignment of ticklabels, labels following the matplotlib convention for the rectangle axes. The axis_direction must be one of [left, right, bottom, top].
property left bottom right top
ticklabels location "-" "+" "+" "-"
axislabel location "-" "+" "+" "-"
ticklabels angle 90 0 -90 180
ticklabel va center baseline center baseline
ticklabel ha right center right center
axislabel angle 180 0 0 180
axislabel va center top center bottom
axislabel ha right center right center Note that the direction "+" and "-" are relative to the direction of the increasing coordinate. Also, the text angles are actually relative to (90 + angle of the direction to the ticklabel), which gives 0 for bottom axis. | matplotlib._as_gen.mpl_toolkits.axisartist.axis_artist.axisartist#mpl_toolkits.axisartist.axis_artist.AxisArtist.set_axis_direction |
set_axislabel_direction(label_direction)[source]
Adjust the direction of the axislabel. Note that the label_directions '+' and '-' are relative to the direction of the increasing coordinate. Parameters
label_direction{"+", "-"} | matplotlib._as_gen.mpl_toolkits.axisartist.axis_artist.axisartist#mpl_toolkits.axisartist.axis_artist.AxisArtist.set_axislabel_direction |
set_axisline_style(axisline_style=None, **kwargs)[source]
Set the axisline style. The new style is completely defined by the passed attributes. Existing style attributes are forgotten. Parameters
axisline_stylestr or None
The line style, e.g. '->', optionally followed by a comma-separated list of attributes. Alternatively, the attributes can be provided as keywords. If None this returns a string containing the available styles. Examples The following two commands are equal: >>> set_axisline_style("->,size=1.5") >>> set_axisline_style("->", size=1.5) | matplotlib._as_gen.mpl_toolkits.axisartist.axis_artist.axisartist#mpl_toolkits.axisartist.axis_artist.AxisArtist.set_axisline_style |
set_label(s)[source]
Set a label that will be displayed in the legend. Parameters
sobject
s will be converted to a string by calling str. | matplotlib._as_gen.mpl_toolkits.axisartist.axis_artist.axisartist#mpl_toolkits.axisartist.axis_artist.AxisArtist.set_label |
set_ticklabel_direction(tick_direction)[source]
Adjust the direction of the ticklabel. Note that the label_directions '+' and '-' are relative to the direction of the increasing coordinate. Parameters
tick_direction{"+", "-"} | matplotlib._as_gen.mpl_toolkits.axisartist.axis_artist.axisartist#mpl_toolkits.axisartist.axis_artist.AxisArtist.set_ticklabel_direction |
toggle(all=None, ticks=None, ticklabels=None, label=None)[source]
Toggle visibility of ticks, ticklabels, and (axis) label. To turn all off, axis.toggle(all=False)
To turn all off but ticks on axis.toggle(all=False, ticks=True)
To turn all on but (axis) label off axis.toggle(all=True, label=False)) | matplotlib._as_gen.mpl_toolkits.axisartist.axis_artist.axisartist#mpl_toolkits.axisartist.axis_artist.AxisArtist.toggle |
ZORDER=2.5 | matplotlib._as_gen.mpl_toolkits.axisartist.axis_artist.axisartist#mpl_toolkits.axisartist.axis_artist.AxisArtist.ZORDER |
zorder=2.5 | matplotlib._as_gen.mpl_toolkits.axisartist.axis_artist.axisartist#mpl_toolkits.axisartist.axis_artist.AxisArtist.zorder |
mpl_toolkits.axisartist.axis_artist.AxisLabel classmpl_toolkits.axisartist.axis_artist.AxisLabel(*args, axis_direction='bottom', axis=None, **kwargs)[source]
Bases: mpl_toolkits.axisartist.axis_artist.AttributeCopier, mpl_toolkits.axisartist.axis_artist.LabelBase Axis Label. Derived from Text. The position of the text is updated in the fly, so changing text position has no effect. Otherwise, the properties can be changed as a normal Text. To change the pad between ticklabels and axis label, use set_pad. 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_visible returns False). Parameters
rendererRendererBase subclass.
Notes This method is overridden in the Artist subclasses.
get_color()[source]
Return the color of the text.
get_pad()[source]
Return the internal pad in points. See set_pad for more details.
get_ref_artist()[source]
Return the underlying artist that actually defines some properties (e.g., color) of this artist.
get_text()[source]
Return the text string.
get_window_extent(renderer)[source]
Return the Bbox bounding the text, in display units. In addition to being used internally, this is useful for specifying clickable regions in a png file on a web page. Parameters
rendererRenderer, optional
A renderer is needed to compute the bounding box. If the artist has already been drawn, the renderer is cached; thus, it is only necessary to pass this argument when calling get_window_extent before the first draw. In practice, it is usually easier to trigger a draw first (e.g. by saving the figure).
dpifloat, optional
The dpi value for computing the bbox, defaults to self.figure.dpi (not the renderer dpi); should be set e.g. if to match regions with a figure saved with a custom dpi value.
set(*, agg_filter=<UNSET>, alpha=<UNSET>, animated=<UNSET>, axis_direction=<UNSET>, backgroundcolor=<UNSET>, bbox=<UNSET>, clip_box=<UNSET>, clip_on=<UNSET>, clip_path=<UNSET>, color=<UNSET>, default_alignment=<UNSET>, default_angle=<UNSET>, fontfamily=<UNSET>, fontproperties=<UNSET>, fontsize=<UNSET>, fontstretch=<UNSET>, fontstyle=<UNSET>, fontvariant=<UNSET>, fontweight=<UNSET>, gid=<UNSET>, horizontalalignment=<UNSET>, in_layout=<UNSET>, label=<UNSET>, linespacing=<UNSET>, math_fontfamily=<UNSET>, multialignment=<UNSET>, pad=<UNSET>, parse_math=<UNSET>, path_effects=<UNSET>, picker=<UNSET>, position=<UNSET>, rasterized=<UNSET>, rotation=<UNSET>, rotation_mode=<UNSET>, sketch_params=<UNSET>, snap=<UNSET>, text=<UNSET>, transform=<UNSET>, transform_rotates_text=<UNSET>, url=<UNSET>, usetex=<UNSET>, verticalalignment=<UNSET>, visible=<UNSET>, wrap=<UNSET>, x=<UNSET>, y=<UNSET>, zorder=<UNSET>)[source]
Set multiple properties at once. Supported properties are
Property Description
agg_filter a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array
alpha scalar or None
animated bool
axis_direction unknown
backgroundcolor color
bbox dict with properties for patches.FancyBboxPatch
clip_box Bbox
clip_on bool
clip_path Patch or (Path, Transform) or None
color or c color
default_alignment unknown
default_angle unknown
figure Figure
fontfamily or family {FONTNAME, 'serif', 'sans-serif', 'cursive', 'fantasy', 'monospace'}
fontproperties or font or font_properties font_manager.FontProperties or str or pathlib.Path
fontsize or size float or {'xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large'}
fontstretch or stretch {a numeric value in range 0-1000, 'ultra-condensed', 'extra-condensed', 'condensed', 'semi-condensed', 'normal', 'semi-expanded', 'expanded', 'extra-expanded', 'ultra-expanded'}
fontstyle or style {'normal', 'italic', 'oblique'}
fontvariant or variant {'normal', 'small-caps'}
fontweight or weight {a numeric value in range 0-1000, 'ultralight', 'light', 'normal', 'regular', 'book', 'medium', 'roman', 'semibold', 'demibold', 'demi', 'bold', 'heavy', 'extra bold', 'black'}
gid str
horizontalalignment or ha {'center', 'right', 'left'}
in_layout bool
label object
linespacing float (multiple of font size)
math_fontfamily str
multialignment or ma {'left', 'right', 'center'}
pad unknown
parse_math bool
path_effects AbstractPathEffect
picker None or bool or float or callable
position (float, float)
rasterized bool
rotation float or {'vertical', 'horizontal'}
rotation_mode {None, 'default', 'anchor'}
sketch_params (scale: float, length: float, randomness: float)
snap bool or None
text object
transform Transform
transform_rotates_text bool
url str
usetex bool or None
verticalalignment or va {'center', 'top', 'bottom', 'baseline', 'center_baseline'}
visible bool
wrap bool
x float
y float
zorder float
set_axis_direction(d)[source]
Adjust the text angle and text alignment of axis label according to the matplotlib convention.
property left bottom right top
axislabel angle 180 0 0 180
axislabel va center top center bottom
axislabel ha right center right center Note that the text angles are actually relative to (90 + angle of the direction to the ticklabel), which gives 0 for bottom axis.
set_default_alignment(d)[source]
set_default_angle(d)[source]
set_pad(pad)[source]
Set the internal pad in points. The actual pad will be the sum of the internal pad and the external pad (the latter is set automatically by the AxisArtist). | matplotlib._as_gen.mpl_toolkits.axisartist.axis_artist.axislabel |
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_visible returns False). Parameters
rendererRendererBase subclass.
Notes This method is overridden in the Artist subclasses. | matplotlib._as_gen.mpl_toolkits.axisartist.axis_artist.axislabel#mpl_toolkits.axisartist.axis_artist.AxisLabel.draw |
get_color()[source]
Return the color of the text. | matplotlib._as_gen.mpl_toolkits.axisartist.axis_artist.axislabel#mpl_toolkits.axisartist.axis_artist.AxisLabel.get_color |
get_pad()[source]
Return the internal pad in points. See set_pad for more details. | matplotlib._as_gen.mpl_toolkits.axisartist.axis_artist.axislabel#mpl_toolkits.axisartist.axis_artist.AxisLabel.get_pad |
get_ref_artist()[source]
Return the underlying artist that actually defines some properties (e.g., color) of this artist. | matplotlib._as_gen.mpl_toolkits.axisartist.axis_artist.axislabel#mpl_toolkits.axisartist.axis_artist.AxisLabel.get_ref_artist |
get_text()[source]
Return the text string. | matplotlib._as_gen.mpl_toolkits.axisartist.axis_artist.axislabel#mpl_toolkits.axisartist.axis_artist.AxisLabel.get_text |
get_window_extent(renderer)[source]
Return the Bbox bounding the text, in display units. In addition to being used internally, this is useful for specifying clickable regions in a png file on a web page. Parameters
rendererRenderer, optional
A renderer is needed to compute the bounding box. If the artist has already been drawn, the renderer is cached; thus, it is only necessary to pass this argument when calling get_window_extent before the first draw. In practice, it is usually easier to trigger a draw first (e.g. by saving the figure).
dpifloat, optional
The dpi value for computing the bbox, defaults to self.figure.dpi (not the renderer dpi); should be set e.g. if to match regions with a figure saved with a custom dpi value. | matplotlib._as_gen.mpl_toolkits.axisartist.axis_artist.axislabel#mpl_toolkits.axisartist.axis_artist.AxisLabel.get_window_extent |
set(*, agg_filter=<UNSET>, alpha=<UNSET>, animated=<UNSET>, axis_direction=<UNSET>, backgroundcolor=<UNSET>, bbox=<UNSET>, clip_box=<UNSET>, clip_on=<UNSET>, clip_path=<UNSET>, color=<UNSET>, default_alignment=<UNSET>, default_angle=<UNSET>, fontfamily=<UNSET>, fontproperties=<UNSET>, fontsize=<UNSET>, fontstretch=<UNSET>, fontstyle=<UNSET>, fontvariant=<UNSET>, fontweight=<UNSET>, gid=<UNSET>, horizontalalignment=<UNSET>, in_layout=<UNSET>, label=<UNSET>, linespacing=<UNSET>, math_fontfamily=<UNSET>, multialignment=<UNSET>, pad=<UNSET>, parse_math=<UNSET>, path_effects=<UNSET>, picker=<UNSET>, position=<UNSET>, rasterized=<UNSET>, rotation=<UNSET>, rotation_mode=<UNSET>, sketch_params=<UNSET>, snap=<UNSET>, text=<UNSET>, transform=<UNSET>, transform_rotates_text=<UNSET>, url=<UNSET>, usetex=<UNSET>, verticalalignment=<UNSET>, visible=<UNSET>, wrap=<UNSET>, x=<UNSET>, y=<UNSET>, zorder=<UNSET>)[source]
Set multiple properties at once. Supported properties are
Property Description
agg_filter a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array
alpha scalar or None
animated bool
axis_direction unknown
backgroundcolor color
bbox dict with properties for patches.FancyBboxPatch
clip_box Bbox
clip_on bool
clip_path Patch or (Path, Transform) or None
color or c color
default_alignment unknown
default_angle unknown
figure Figure
fontfamily or family {FONTNAME, 'serif', 'sans-serif', 'cursive', 'fantasy', 'monospace'}
fontproperties or font or font_properties font_manager.FontProperties or str or pathlib.Path
fontsize or size float or {'xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large'}
fontstretch or stretch {a numeric value in range 0-1000, 'ultra-condensed', 'extra-condensed', 'condensed', 'semi-condensed', 'normal', 'semi-expanded', 'expanded', 'extra-expanded', 'ultra-expanded'}
fontstyle or style {'normal', 'italic', 'oblique'}
fontvariant or variant {'normal', 'small-caps'}
fontweight or weight {a numeric value in range 0-1000, 'ultralight', 'light', 'normal', 'regular', 'book', 'medium', 'roman', 'semibold', 'demibold', 'demi', 'bold', 'heavy', 'extra bold', 'black'}
gid str
horizontalalignment or ha {'center', 'right', 'left'}
in_layout bool
label object
linespacing float (multiple of font size)
math_fontfamily str
multialignment or ma {'left', 'right', 'center'}
pad unknown
parse_math bool
path_effects AbstractPathEffect
picker None or bool or float or callable
position (float, float)
rasterized bool
rotation float or {'vertical', 'horizontal'}
rotation_mode {None, 'default', 'anchor'}
sketch_params (scale: float, length: float, randomness: float)
snap bool or None
text object
transform Transform
transform_rotates_text bool
url str
usetex bool or None
verticalalignment or va {'center', 'top', 'bottom', 'baseline', 'center_baseline'}
visible bool
wrap bool
x float
y float
zorder float | matplotlib._as_gen.mpl_toolkits.axisartist.axis_artist.axislabel#mpl_toolkits.axisartist.axis_artist.AxisLabel.set |
set_axis_direction(d)[source]
Adjust the text angle and text alignment of axis label according to the matplotlib convention.
property left bottom right top
axislabel angle 180 0 0 180
axislabel va center top center bottom
axislabel ha right center right center Note that the text angles are actually relative to (90 + angle of the direction to the ticklabel), which gives 0 for bottom axis. | matplotlib._as_gen.mpl_toolkits.axisartist.axis_artist.axislabel#mpl_toolkits.axisartist.axis_artist.AxisLabel.set_axis_direction |
set_default_alignment(d)[source] | matplotlib._as_gen.mpl_toolkits.axisartist.axis_artist.axislabel#mpl_toolkits.axisartist.axis_artist.AxisLabel.set_default_alignment |
set_default_angle(d)[source] | matplotlib._as_gen.mpl_toolkits.axisartist.axis_artist.axislabel#mpl_toolkits.axisartist.axis_artist.AxisLabel.set_default_angle |
set_pad(pad)[source]
Set the internal pad in points. The actual pad will be the sum of the internal pad and the external pad (the latter is set automatically by the AxisArtist). | matplotlib._as_gen.mpl_toolkits.axisartist.axis_artist.axislabel#mpl_toolkits.axisartist.axis_artist.AxisLabel.set_pad |
mpl_toolkits.axisartist.axis_artist.GridlinesCollection classmpl_toolkits.axisartist.axis_artist.GridlinesCollection(*args, which='major', axis='both', **kwargs)[source]
Bases: matplotlib.collections.LineCollection Parameters
which{"major", "minor"}
axis{"both", "x", "y"}
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_visible returns False). Parameters
rendererRendererBase subclass.
Notes This method is overridden in the Artist subclasses.
set(*, agg_filter=<UNSET>, alpha=<UNSET>, animated=<UNSET>, antialiased=<UNSET>, array=<UNSET>, axis=<UNSET>, capstyle=<UNSET>, clim=<UNSET>, clip_box=<UNSET>, clip_on=<UNSET>, clip_path=<UNSET>, cmap=<UNSET>, color=<UNSET>, colors=<UNSET>, edgecolor=<UNSET>, facecolor=<UNSET>, gid=<UNSET>, grid_helper=<UNSET>, hatch=<UNSET>, in_layout=<UNSET>, joinstyle=<UNSET>, label=<UNSET>, linestyle=<UNSET>, linewidth=<UNSET>, norm=<UNSET>, offset_transform=<UNSET>, offsets=<UNSET>, path_effects=<UNSET>, paths=<UNSET>, picker=<UNSET>, pickradius=<UNSET>, rasterized=<UNSET>, segments=<UNSET>, sketch_params=<UNSET>, snap=<UNSET>, transform=<UNSET>, url=<UNSET>, urls=<UNSET>, verts=<UNSET>, visible=<UNSET>, which=<UNSET>, zorder=<UNSET>)[source]
Set multiple properties at once. Supported properties are
Property Description
agg_filter a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array
alpha array-like or scalar or None
animated bool
antialiased or aa or antialiaseds bool or list of bools
array array-like or None
axis unknown
capstyle CapStyle or {'butt', 'projecting', 'round'}
clim (vmin: float, vmax: float)
clip_box Bbox
clip_on bool
clip_path Patch or (Path, Transform) or None
cmap Colormap or str or None
color color or list of colors
colors color or list of colors
edgecolor or ec or edgecolors color or list of colors or 'face'
facecolor or facecolors or fc color or list of colors
figure Figure
gid str
grid_helper unknown
hatch {'/', '\', '|', '-', '+', 'x', 'o', 'O', '.', '*'}
in_layout bool
joinstyle JoinStyle or {'miter', 'round', 'bevel'}
label object
linestyle or dashes or linestyles or ls str or tuple or list thereof
linewidth or linewidths or lw float or list of floats
norm Normalize or None
offset_transform Transform
offsets (N, 2) or (2,) array-like
path_effects AbstractPathEffect
paths unknown
picker None or bool or float or callable
pickradius float
rasterized bool
segments unknown
sketch_params (scale: float, length: float, randomness: float)
snap bool or None
transform Transform
url str
urls list of str or None
verts unknown
visible bool
which unknown
zorder float
set_axis(axis)[source]
set_grid_helper(grid_helper)[source]
set_which(which)[source] | matplotlib._as_gen.mpl_toolkits.axisartist.axis_artist.gridlinescollection |
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_visible returns False). Parameters
rendererRendererBase subclass.
Notes This method is overridden in the Artist subclasses. | matplotlib._as_gen.mpl_toolkits.axisartist.axis_artist.gridlinescollection#mpl_toolkits.axisartist.axis_artist.GridlinesCollection.draw |
set(*, agg_filter=<UNSET>, alpha=<UNSET>, animated=<UNSET>, antialiased=<UNSET>, array=<UNSET>, axis=<UNSET>, capstyle=<UNSET>, clim=<UNSET>, clip_box=<UNSET>, clip_on=<UNSET>, clip_path=<UNSET>, cmap=<UNSET>, color=<UNSET>, colors=<UNSET>, edgecolor=<UNSET>, facecolor=<UNSET>, gid=<UNSET>, grid_helper=<UNSET>, hatch=<UNSET>, in_layout=<UNSET>, joinstyle=<UNSET>, label=<UNSET>, linestyle=<UNSET>, linewidth=<UNSET>, norm=<UNSET>, offset_transform=<UNSET>, offsets=<UNSET>, path_effects=<UNSET>, paths=<UNSET>, picker=<UNSET>, pickradius=<UNSET>, rasterized=<UNSET>, segments=<UNSET>, sketch_params=<UNSET>, snap=<UNSET>, transform=<UNSET>, url=<UNSET>, urls=<UNSET>, verts=<UNSET>, visible=<UNSET>, which=<UNSET>, zorder=<UNSET>)[source]
Set multiple properties at once. Supported properties are
Property Description
agg_filter a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array
alpha array-like or scalar or None
animated bool
antialiased or aa or antialiaseds bool or list of bools
array array-like or None
axis unknown
capstyle CapStyle or {'butt', 'projecting', 'round'}
clim (vmin: float, vmax: float)
clip_box Bbox
clip_on bool
clip_path Patch or (Path, Transform) or None
cmap Colormap or str or None
color color or list of colors
colors color or list of colors
edgecolor or ec or edgecolors color or list of colors or 'face'
facecolor or facecolors or fc color or list of colors
figure Figure
gid str
grid_helper unknown
hatch {'/', '\', '|', '-', '+', 'x', 'o', 'O', '.', '*'}
in_layout bool
joinstyle JoinStyle or {'miter', 'round', 'bevel'}
label object
linestyle or dashes or linestyles or ls str or tuple or list thereof
linewidth or linewidths or lw float or list of floats
norm Normalize or None
offset_transform Transform
offsets (N, 2) or (2,) array-like
path_effects AbstractPathEffect
paths unknown
picker None or bool or float or callable
pickradius float
rasterized bool
segments unknown
sketch_params (scale: float, length: float, randomness: float)
snap bool or None
transform Transform
url str
urls list of str or None
verts unknown
visible bool
which unknown
zorder float | matplotlib._as_gen.mpl_toolkits.axisartist.axis_artist.gridlinescollection#mpl_toolkits.axisartist.axis_artist.GridlinesCollection.set |
set_axis(axis)[source] | matplotlib._as_gen.mpl_toolkits.axisartist.axis_artist.gridlinescollection#mpl_toolkits.axisartist.axis_artist.GridlinesCollection.set_axis |
set_grid_helper(grid_helper)[source] | matplotlib._as_gen.mpl_toolkits.axisartist.axis_artist.gridlinescollection#mpl_toolkits.axisartist.axis_artist.GridlinesCollection.set_grid_helper |
set_which(which)[source] | matplotlib._as_gen.mpl_toolkits.axisartist.axis_artist.gridlinescollection#mpl_toolkits.axisartist.axis_artist.GridlinesCollection.set_which |
mpl_toolkits.axisartist.axis_artist.LabelBase classmpl_toolkits.axisartist.axis_artist.LabelBase(*args, **kwargs)[source]
Bases: matplotlib.text.Text A base class for AxisLabel and TickLabels. The position and angle of the text are calculated by to offset_ref_angle, text_ref_angle, and offset_radius attributes. Create a Text instance at x, y with string text. Valid keyword arguments are:
Property Description
agg_filter a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array
alpha scalar or None
animated bool
backgroundcolor color
bbox dict with properties for patches.FancyBboxPatch
clip_box unknown
clip_on unknown
clip_path unknown
color or c color
figure Figure
fontfamily or family {FONTNAME, 'serif', 'sans-serif', 'cursive', 'fantasy', 'monospace'}
fontproperties or font or font_properties font_manager.FontProperties or str or pathlib.Path
fontsize or size float or {'xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large'}
fontstretch or stretch {a numeric value in range 0-1000, 'ultra-condensed', 'extra-condensed', 'condensed', 'semi-condensed', 'normal', 'semi-expanded', 'expanded', 'extra-expanded', 'ultra-expanded'}
fontstyle or style {'normal', 'italic', 'oblique'}
fontvariant or variant {'normal', 'small-caps'}
fontweight or weight {a numeric value in range 0-1000, 'ultralight', 'light', 'normal', 'regular', 'book', 'medium', 'roman', 'semibold', 'demibold', 'demi', 'bold', 'heavy', 'extra bold', 'black'}
gid str
horizontalalignment or ha {'center', 'right', 'left'}
in_layout bool
label object
linespacing float (multiple of font size)
math_fontfamily str
multialignment or ma {'left', 'right', 'center'}
parse_math bool
path_effects AbstractPathEffect
picker None or bool or float or callable
position (float, float)
rasterized bool
rotation float or {'vertical', 'horizontal'}
rotation_mode {None, 'default', 'anchor'}
sketch_params (scale: float, length: float, randomness: float)
snap bool or None
text object
transform Transform
transform_rotates_text bool
url str
usetex bool or None
verticalalignment or va {'center', 'top', 'bottom', 'baseline', 'center_baseline'}
visible bool
wrap bool
x float
y float
zorder float 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_visible returns False). Parameters
rendererRendererBase subclass.
Notes This method is overridden in the Artist subclasses.
get_window_extent(renderer)[source]
Return the Bbox bounding the text, in display units. In addition to being used internally, this is useful for specifying clickable regions in a png file on a web page. Parameters
rendererRenderer, optional
A renderer is needed to compute the bounding box. If the artist has already been drawn, the renderer is cached; thus, it is only necessary to pass this argument when calling get_window_extent before the first draw. In practice, it is usually easier to trigger a draw first (e.g. by saving the figure).
dpifloat, optional
The dpi value for computing the bbox, defaults to self.figure.dpi (not the renderer dpi); should be set e.g. if to match regions with a figure saved with a custom dpi value.
set(*, agg_filter=<UNSET>, alpha=<UNSET>, animated=<UNSET>, backgroundcolor=<UNSET>, bbox=<UNSET>, clip_box=<UNSET>, clip_on=<UNSET>, clip_path=<UNSET>, color=<UNSET>, fontfamily=<UNSET>, fontproperties=<UNSET>, fontsize=<UNSET>, fontstretch=<UNSET>, fontstyle=<UNSET>, fontvariant=<UNSET>, fontweight=<UNSET>, gid=<UNSET>, horizontalalignment=<UNSET>, in_layout=<UNSET>, label=<UNSET>, linespacing=<UNSET>, math_fontfamily=<UNSET>, multialignment=<UNSET>, parse_math=<UNSET>, path_effects=<UNSET>, picker=<UNSET>, position=<UNSET>, rasterized=<UNSET>, rotation=<UNSET>, rotation_mode=<UNSET>, sketch_params=<UNSET>, snap=<UNSET>, text=<UNSET>, transform=<UNSET>, transform_rotates_text=<UNSET>, url=<UNSET>, usetex=<UNSET>, verticalalignment=<UNSET>, visible=<UNSET>, wrap=<UNSET>, x=<UNSET>, y=<UNSET>, zorder=<UNSET>)[source]
Set multiple properties at once. Supported properties are
Property Description
agg_filter a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array
alpha scalar or None
animated bool
backgroundcolor color
bbox dict with properties for patches.FancyBboxPatch
clip_box Bbox
clip_on bool
clip_path Patch or (Path, Transform) or None
color or c color
figure Figure
fontfamily or family {FONTNAME, 'serif', 'sans-serif', 'cursive', 'fantasy', 'monospace'}
fontproperties or font or font_properties font_manager.FontProperties or str or pathlib.Path
fontsize or size float or {'xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large'}
fontstretch or stretch {a numeric value in range 0-1000, 'ultra-condensed', 'extra-condensed', 'condensed', 'semi-condensed', 'normal', 'semi-expanded', 'expanded', 'extra-expanded', 'ultra-expanded'}
fontstyle or style {'normal', 'italic', 'oblique'}
fontvariant or variant {'normal', 'small-caps'}
fontweight or weight {a numeric value in range 0-1000, 'ultralight', 'light', 'normal', 'regular', 'book', 'medium', 'roman', 'semibold', 'demibold', 'demi', 'bold', 'heavy', 'extra bold', 'black'}
gid str
horizontalalignment or ha {'center', 'right', 'left'}
in_layout bool
label object
linespacing float (multiple of font size)
math_fontfamily str
multialignment or ma {'left', 'right', 'center'}
parse_math bool
path_effects AbstractPathEffect
picker None or bool or float or callable
position (float, float)
rasterized bool
rotation float or {'vertical', 'horizontal'}
rotation_mode {None, 'default', 'anchor'}
sketch_params (scale: float, length: float, randomness: float)
snap bool or None
text object
transform Transform
transform_rotates_text bool
url str
usetex bool or None
verticalalignment or va {'center', 'top', 'bottom', 'baseline', 'center_baseline'}
visible bool
wrap bool
x float
y float
zorder float | matplotlib._as_gen.mpl_toolkits.axisartist.axis_artist.labelbase |
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_visible returns False). Parameters
rendererRendererBase subclass.
Notes This method is overridden in the Artist subclasses. | matplotlib._as_gen.mpl_toolkits.axisartist.axis_artist.labelbase#mpl_toolkits.axisartist.axis_artist.LabelBase.draw |
get_window_extent(renderer)[source]
Return the Bbox bounding the text, in display units. In addition to being used internally, this is useful for specifying clickable regions in a png file on a web page. Parameters
rendererRenderer, optional
A renderer is needed to compute the bounding box. If the artist has already been drawn, the renderer is cached; thus, it is only necessary to pass this argument when calling get_window_extent before the first draw. In practice, it is usually easier to trigger a draw first (e.g. by saving the figure).
dpifloat, optional
The dpi value for computing the bbox, defaults to self.figure.dpi (not the renderer dpi); should be set e.g. if to match regions with a figure saved with a custom dpi value. | matplotlib._as_gen.mpl_toolkits.axisartist.axis_artist.labelbase#mpl_toolkits.axisartist.axis_artist.LabelBase.get_window_extent |
set(*, agg_filter=<UNSET>, alpha=<UNSET>, animated=<UNSET>, backgroundcolor=<UNSET>, bbox=<UNSET>, clip_box=<UNSET>, clip_on=<UNSET>, clip_path=<UNSET>, color=<UNSET>, fontfamily=<UNSET>, fontproperties=<UNSET>, fontsize=<UNSET>, fontstretch=<UNSET>, fontstyle=<UNSET>, fontvariant=<UNSET>, fontweight=<UNSET>, gid=<UNSET>, horizontalalignment=<UNSET>, in_layout=<UNSET>, label=<UNSET>, linespacing=<UNSET>, math_fontfamily=<UNSET>, multialignment=<UNSET>, parse_math=<UNSET>, path_effects=<UNSET>, picker=<UNSET>, position=<UNSET>, rasterized=<UNSET>, rotation=<UNSET>, rotation_mode=<UNSET>, sketch_params=<UNSET>, snap=<UNSET>, text=<UNSET>, transform=<UNSET>, transform_rotates_text=<UNSET>, url=<UNSET>, usetex=<UNSET>, verticalalignment=<UNSET>, visible=<UNSET>, wrap=<UNSET>, x=<UNSET>, y=<UNSET>, zorder=<UNSET>)[source]
Set multiple properties at once. Supported properties are
Property Description
agg_filter a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array
alpha scalar or None
animated bool
backgroundcolor color
bbox dict with properties for patches.FancyBboxPatch
clip_box Bbox
clip_on bool
clip_path Patch or (Path, Transform) or None
color or c color
figure Figure
fontfamily or family {FONTNAME, 'serif', 'sans-serif', 'cursive', 'fantasy', 'monospace'}
fontproperties or font or font_properties font_manager.FontProperties or str or pathlib.Path
fontsize or size float or {'xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large'}
fontstretch or stretch {a numeric value in range 0-1000, 'ultra-condensed', 'extra-condensed', 'condensed', 'semi-condensed', 'normal', 'semi-expanded', 'expanded', 'extra-expanded', 'ultra-expanded'}
fontstyle or style {'normal', 'italic', 'oblique'}
fontvariant or variant {'normal', 'small-caps'}
fontweight or weight {a numeric value in range 0-1000, 'ultralight', 'light', 'normal', 'regular', 'book', 'medium', 'roman', 'semibold', 'demibold', 'demi', 'bold', 'heavy', 'extra bold', 'black'}
gid str
horizontalalignment or ha {'center', 'right', 'left'}
in_layout bool
label object
linespacing float (multiple of font size)
math_fontfamily str
multialignment or ma {'left', 'right', 'center'}
parse_math bool
path_effects AbstractPathEffect
picker None or bool or float or callable
position (float, float)
rasterized bool
rotation float or {'vertical', 'horizontal'}
rotation_mode {None, 'default', 'anchor'}
sketch_params (scale: float, length: float, randomness: float)
snap bool or None
text object
transform Transform
transform_rotates_text bool
url str
usetex bool or None
verticalalignment or va {'center', 'top', 'bottom', 'baseline', 'center_baseline'}
visible bool
wrap bool
x float
y float
zorder float | matplotlib._as_gen.mpl_toolkits.axisartist.axis_artist.labelbase#mpl_toolkits.axisartist.axis_artist.LabelBase.set |
mpl_toolkits.axisartist.axis_artist.TickLabels classmpl_toolkits.axisartist.axis_artist.TickLabels(*, axis_direction='bottom', **kwargs)[source]
Bases: mpl_toolkits.axisartist.axis_artist.AxisLabel Tick Labels. While derived from Text, this single artist draws all ticklabels. As in AxisLabel, the position of the text is updated in the fly, so changing text position has no effect. Otherwise, the properties can be changed as a normal Text. Unlike the ticklabels of the mainline matplotlib, properties of single ticklabel alone cannot modified. To change the pad between ticks and ticklabels, use set_pad. 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_visible returns False). Parameters
rendererRendererBase subclass.
Notes This method is overridden in the Artist subclasses.
get_ref_artist()[source]
Return the underlying artist that actually defines some properties (e.g., color) of this artist.
get_texts_widths_heights_descents(renderer)[source]
Return a list of (width, height, descent) tuples for ticklabels. Empty labels are left out.
get_window_extents(renderer)[source]
invert_axis_direction()[source]
set(*, agg_filter=<UNSET>, alpha=<UNSET>, animated=<UNSET>, axis_direction=<UNSET>, backgroundcolor=<UNSET>, bbox=<UNSET>, clip_box=<UNSET>, clip_on=<UNSET>, clip_path=<UNSET>, color=<UNSET>, default_alignment=<UNSET>, default_angle=<UNSET>, fontfamily=<UNSET>, fontproperties=<UNSET>, fontsize=<UNSET>, fontstretch=<UNSET>, fontstyle=<UNSET>, fontvariant=<UNSET>, fontweight=<UNSET>, gid=<UNSET>, horizontalalignment=<UNSET>, in_layout=<UNSET>, label=<UNSET>, linespacing=<UNSET>, locs_angles_labels=<UNSET>, math_fontfamily=<UNSET>, multialignment=<UNSET>, pad=<UNSET>, parse_math=<UNSET>, path_effects=<UNSET>, picker=<UNSET>, position=<UNSET>, rasterized=<UNSET>, rotation=<UNSET>, rotation_mode=<UNSET>, sketch_params=<UNSET>, snap=<UNSET>, text=<UNSET>, transform=<UNSET>, transform_rotates_text=<UNSET>, url=<UNSET>, usetex=<UNSET>, verticalalignment=<UNSET>, visible=<UNSET>, wrap=<UNSET>, x=<UNSET>, y=<UNSET>, zorder=<UNSET>)[source]
Set multiple properties at once. Supported properties are
Property Description
agg_filter a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array
alpha scalar or None
animated bool
axis_direction unknown
backgroundcolor color
bbox dict with properties for patches.FancyBboxPatch
clip_box Bbox
clip_on bool
clip_path Patch or (Path, Transform) or None
color or c color
default_alignment unknown
default_angle unknown
figure Figure
fontfamily or family {FONTNAME, 'serif', 'sans-serif', 'cursive', 'fantasy', 'monospace'}
fontproperties or font or font_properties font_manager.FontProperties or str or pathlib.Path
fontsize or size float or {'xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large'}
fontstretch or stretch {a numeric value in range 0-1000, 'ultra-condensed', 'extra-condensed', 'condensed', 'semi-condensed', 'normal', 'semi-expanded', 'expanded', 'extra-expanded', 'ultra-expanded'}
fontstyle or style {'normal', 'italic', 'oblique'}
fontvariant or variant {'normal', 'small-caps'}
fontweight or weight {a numeric value in range 0-1000, 'ultralight', 'light', 'normal', 'regular', 'book', 'medium', 'roman', 'semibold', 'demibold', 'demi', 'bold', 'heavy', 'extra bold', 'black'}
gid str
horizontalalignment or ha {'center', 'right', 'left'}
in_layout bool
label object
linespacing float (multiple of font size)
locs_angles_labels unknown
math_fontfamily str
multialignment or ma {'left', 'right', 'center'}
pad unknown
parse_math bool
path_effects AbstractPathEffect
picker None or bool or float or callable
position (float, float)
rasterized bool
rotation float or {'vertical', 'horizontal'}
rotation_mode {None, 'default', 'anchor'}
sketch_params (scale: float, length: float, randomness: float)
snap bool or None
text object
transform Transform
transform_rotates_text bool
url str
usetex bool or None
verticalalignment or va {'center', 'top', 'bottom', 'baseline', 'center_baseline'}
visible bool
wrap bool
x float
y float
zorder float
set_axis_direction(label_direction)[source]
Adjust the text angle and text alignment of ticklabels according to the matplotlib convention. The label_direction must be one of [left, right, bottom, top].
property left bottom right top
ticklabels angle 90 0 -90 180
ticklabel va center baseline center baseline
ticklabel ha right center right center Note that the text angles are actually relative to (90 + angle of the direction to the ticklabel), which gives 0 for bottom axis.
set_locs_angles_labels(locs_angles_labels)[source] | matplotlib._as_gen.mpl_toolkits.axisartist.axis_artist.ticklabels |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.