Axes.format¶
-
Axes.
format
(*, title=None, abovetop=None, figtitle=None, suptitle=None, rowlabels=None, collabels=None, leftlabels=None, rightlabels=None, toplabels=None, bottomlabels=None, llabels=None, rlabels=None, tlabels=None, blabels=None, ltitle=None, ctitle=None, rtitle=None, ultitle=None, uctitle=None, urtitle=None, lltitle=None, lctitle=None, lrtitle=None)[source]¶ Modify the axes title(s), the a-b-c label, row and column labels, and the figure title. Called by
XYAxes.format
,ProjAxes.format
, andPolarAxes.format
.- Parameters
title (str, optional) – The axes title.
abc (bool, optional) – Whether to apply “a-b-c” subplot labelling based on the
number
attribute. Ifnumber
is >26, the labels will loop around to a, …, z, aa, …, zz, aaa, …, zzz, … Default isrc.abc
=False
.abcstyle (str, optional) – String denoting the format of a-b-c labels containing the character
a
orA
.'a'
is the default, but e.g.'a.'
,'a)'
, or'A'
might also be desirable. Default isrc[‘abc.style’]
='a'
.abcloc, titleloc (str, optional) – Strings indicating the location for the a-b-c label and main title. The following locations keys are valid (defaults are
rc[‘abc.loc’]
='l'
andrc[‘title.loc’]
='c'
):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, optional) – 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. Defaults are
rc[‘abc.border’]
=True
andrc[‘title.border’]
=True
abovetop (bool, optional) – Whether to try to put the title and a-b-c label above the top panel (if it exists), or to always put them above the main subplot. Default is
True
.ltitle, ctitle, rtitle, ultitle, uctitle, urtitle, lltitle, lctitle, lrtitle (str, optional) – Axes titles in specific positions (see
abcloc
). This lets you specify multiple title-like labels for a single subplot.leftlabels, rightlabels, toplabels, bottomlabels (list of str, optional) – Labels for the subplots lying along the left, right, top, and bottom edges of the figure. The length of each list must match the number of subplots along the corresponding edge.
rowlabels, collabels (list of str, optional) – Aliases for
leftlabels
,toplabels
.llabels, rlabels, tlabels, blabels (list of str, optional) – Aliases for
leftlabels
,toplabels
,rightlabels
,bottomlabels
.figtitle, suptitle (str, optional) – The figure “super” title, centered between the left edge of the lefmost column of subplots and the right edge of the rightmost column of subplots, and automatically offset above figure titles. This is an improvement on matplotlib’s “super” title, which just centers the text between figure edges.
Note
The
abc
,abcstyle
,abcloc
, andtitleloc
keyword arguments are actually configuration settings that are temporarily changed by the call tocontext
. They are documented here because it is very common to change them withformat
. They also appear in the tables in therctools
documention.See also
None()
,None()
,None()
,None()