3D Components
- class canvas
Bases:
object
- method_backend()
- method_figure()
- method_workspace_style()
- method_background_color()
- method_subplots_adjust()
- method_save()
- method_show()
- method_setup()
- method_pane_fill()
- method_spines()
- method_remove_axes()
- class guides
Bases:
object
- method_colorbar()
- method_grid()
- method_legend()
- method_tick_locs()
- method_tick_labels()
- class text
Bases:
object
- method_fonts()
For context, Matplotlib’s typesetting works as follows.
- Five typeface families are defined: serif, cursive, sans-serif,
monospace and fantasy.
Each family has a list of typefaces associated with it.
- The user then chooses a family to typeset a plot, and the first typeface
in the family’s typeface list found in the user’s system is used to do so.
Matplotlib allows users to modify the lists of typefaces of each family through its runtime configuration (rc) dictionary, ``matplotlib.rcParams` <https://matplotlib.org/stable/tutorials/introductory/customizing.html>`_. This dictionary will be referred to as
rcParams
.MPL Plotter sets lists of its own for each of the typeface families, as well as choosing a default and fallback typeface for math.
The typesetting of text in MPL Plotter is defined by two parameters:
font
font_math
Furthermore, MPL Plotter allows the user to set the default color for all text, including title, labels and floating text, with the parameter
font_color
.font
If the
font
attribute of the plot is one of these families,rcParams
font.family
entry will be set toplot.font
, thereby making the first found typeface of theplot.font
family typeface list the chosen typeface for text in your plot.Otherwise, that is, if the
font
attribute of the plot is not one of the families, the providedfont
will beinsert``ed to the *serif* family typeface list, and the ``rcParams
font.family
entry will be set to serif, thereby making the providedfont
the chosen typeface for text in the plot.font_math
The
font_math
attribute of the plot determines the typeface used for math through thercParams
'mathtext.fontset
entry, and it may take the following values:cm
(Computer Modern)dejavusans
dejavuserif
stix
stixsans
Lastly, Matplotlib allows users to choose the typeface of bold, calligraphic, italic and other highlight typefaces for rendered math. MPL Plotter does not provide an interface for this, but it can be done my manually setting the value of the following entries in
rcParams
:mathtext.bf
mathtext.cal
mathtext.it
mathtext.rm
mathtext.sf
mathtext.tt
font_color
The default text color, set through the
rcParams
text.color
andaxis.labelcolor
entries, may be overridden, and MPL Plotter offers thetitle_color
argument to that effect in the case of titles. To override the color of tick and axis labels or other text in a plot please consult the Matplotlib documentation. As long as you do not setshow=True
in the call to an MPL Plotter plotting class, you are free to continue customization afterwards, including but not limited to text color.
- method_title()
- method_axis_labels()