Axes¶
- class Axes(*args, **kwargs)[source]¶
Bases:
Axes
The lowest-level
Axes
subclass used by proplot. Implements basic universal features.- Parameters
*args – Passed to
matplotlib.axes.Axes
.title (
str
or sequence, optional) – The axes title. Can optionally be a sequence strings, in which case the title will be selected from the sequence according tonumber
.abc (
bool
orstr
or sequence, default:rc.abc
=False
) – The “a-b-c” subplot label style. Must contain the charactera
orA
, for example'a.'
, or'A'
. IfTrue
then the default style of'a'
is used. Thea
orA
is replaced with the alphabetic character matching thenumber
. Ifnumber
is greater than 26, the characters loop around to a, …, z, aa, …, zz, aaa, …, zzz, etc. Can also be a sequence of strings, in which case the “a-b-c” label will simply be selected from the sequence according tonumber
.abcloc, titleloc (
str
, default:rc['abc.loc']
='left'
,rc['title.loc']
='center'
) – Strings indicating the location for the a-b-c label and main title. The following locations are valid:Location
Valid keys
center above axes
'center'
,'c'
left above axes
'left'
,'l'
right above axes
'right'
,'r'
lower center inside axes
'lower center'
,'lc'
upper center inside axes
'upper center'
,'uc'
upper right inside axes
'upper right'
,'ur'
upper left inside axes
'upper left'
,'ul'
lower left inside axes
'lower left'
,'ll'
lower right inside axes
'lower right'
,'lr'
abcborder, titleborder (
bool
, default:rc['abc.border']
=True
andrc['title.border']
=True
) – Whether to draw a white border around titles and a-b-c labels positioned inside the axes. This can help them stand out on top of artists plotted inside the axes.abcbbox, titlebbox (
bool
, default:rc['abc.bbox']
=False
andrc['title.bbox']
=False
) – Whether to draw a white bbox around titles and a-b-c labels positioned inside the axes. This can help them stand out on top of artists plotted inside the axes.abc_kw, title_kw (dict-like, optional) – Additional settings used to update the a-b-c label and title with
text.update()
.titlepad (
float
, default:rc['title.pad']
=5.0
) – The padding for the inner and outer titles and a-b-c labels. If float, units are points. If string, interpreted byunits
.titleabove (
bool
, default:rc['title.above']
=True
) – Whether to try to put outer titles and a-b-c labels above panels, colorbars, or legends that are above the axes.abctitlepad (
float
, default:rc['abc.titlepad']
=4.0
) – The horizontal padding between a-b-c labels and titles in the same location. If float, units are points. If string, interpreted byunits
.ltitle, ctitle, rtitle, ultitle, uctitle, urtitle, lltitle, lctitle, lrtitle (
str
or sequence, optional) – Shorthands for the below keywords.lefttitle, centertitle, righttitle, upperlefttitle, uppercentertitle, upperrighttitle, lowerlefttitle, lowercentertitle, lowerrighttitle (
str
or sequence, optional) – Additional titles in specific positions (seetitle
for details). This works as an alternative to theax.format(title='Title', titleloc=loc)
workflow and permits adding more than one title-like label for a single axes.a, alpha, fc, facecolor, ec, edgecolor, lw, linewidth, ls, linestyle (default:
rc['axes.alpha']
=None
,rc['axes.facecolor']
='white'
,rc['axes.edgecolor']
='black'
,rc['axes.linewidth']
=0.6
,'-'
) – Additional settings applied to the background patch, and their shorthands. Their defaults values are the'axes'
properties.
- Other Parameters
rc_mode (
int
, optional) – The context mode passed tocontext
.rc_kw (dict-like, optional) – An alternative to passing extra keyword arguments. See below.
**kwargs – Remaining keyword arguments are passed to
matplotlib.axes.Axes
. Keyword arguments that match the name of anrc
setting are passed toproplot.config.Configurator.context
and used to update the axes. If the setting name has “dots” you can simply omit the dots. For example,abc='A.'
modifies therc.abc
setting,titleloc='left'
modifies therc['title.loc']
setting,gridminor=True
modifies therc.gridminor
setting, andgridbelow=True
modifies therc['grid.below']
setting. Many of the keyword arguments documented above are internally applied by retrieving settings passed tocontext
.
See also
Axes.format
,matplotlib.axes.Axes
,proplot.axes.PlotAxes
,proplot.axes.CartesianAxes
,proplot.axes.PolarAxes
,proplot.axes.GeoAxes
,proplot.figure.Figure.subplot
,proplot.figure.Figure.add_subplot
Attributes Summary
The axes number.
Methods Summary
colorbar
(**kwargs)Add an inset colorbar or an outer colorbar along the edge of the axes.
format
()Modify the a-b-c label, axes title(s), and background patch, and call
proplot.figure.Figure.format
on the axes figure.indicate_inset_zoom
(**kwargs)Add indicators denoting the zoom range of the inset axes.
inset
(*args, **kwargs)Add an inset axes.
inset_axes
(*args, **kwargs)Add an inset axes.
legend
(**kwargs)Add an inset legend or outer legend along the edge of the axes.
panel
([side])Add a panel axes.
panel_axes
([side])Add a panel axes.
text
(**kwargs)Add text to the axes.