Common
- method_backend(plot)
- method_figure(plot)
- method_colorbar(plot)
- method_fonts(plot)
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:
fontfont_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
fontattribute of the plot is one of these families,rcParamsfont.familyentry will be set toplot.font, thereby making the first found typeface of theplot.fontfamily typeface list the chosen typeface for text in your plot.Otherwise, that is, if the
fontattribute of the plot is not one of the families, the providedfontwill beinsert``ed to the *serif* family typeface list, and the ``rcParamsfont.familyentry will be set to serif, thereby making the providedfontthe chosen typeface for text in the plot.font_math
The
font_mathattribute of the plot determines the typeface used for math through thercParams'mathtext.fontsetentry, and it may take the following values:cm(Computer Modern)dejavusansdejavuserifstixstixsans
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.bfmathtext.calmathtext.itmathtext.rmmathtext.sfmathtext.tt
font_color
The default text color, set through the
rcParamstext.colorandaxis.labelcolorentries, may be overridden, and MPL Plotter offers thetitle_colorargument 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=Truein the call to an MPL Plotter plotting class, you are free to continue customization afterwards, including but not limited to text color.
- method_workspace_style(plot)
- method_background_color(plot)
- method_subplots_adjust(plot)
- method_save(plot)
- method_show(plot)