The font properties are the six properties described in the :None:None:`W3C Cascading Style Sheet, Level 1
<http://www.w3.org/TR/1998/REC-CSS2-19980512/>`
font specification and math_fontfamily for math fonts:
family: A list of font names in decreasing order of priority. The items may include a generic font family name, either 'sans-serif' (default), 'serif', 'cursive', 'fantasy', or 'monospace'. In that case, the actual font to be used will be looked up from the associated rcParam.
style: Either 'normal' (default), 'italic' or 'oblique'.
variant: Either 'normal' (default) or 'small-caps'.
stretch: A numeric value in the range 0-1000 or one of 'ultra-condensed', 'extra-condensed', 'condensed', 'semi-condensed', 'normal' (default), 'semi-expanded', 'expanded', 'extra-expanded' or 'ultra-expanded'.
weight: A numeric value in the range 0-1000 or one of 'ultralight', 'light', 'normal' (default), 'regular', 'book', 'medium', 'roman', 'semibold', 'demibold', 'demi', 'bold', 'heavy', 'extra bold', 'black'.
size: Either an relative value of 'xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large' or an absolute font size, e.g., 10 (default).
math_fontfamily: The family of fonts used to render math text; overrides mathtext.fontset
. Supported values are the same as the ones supported by mathtext.fontset
: 'dejavusans', 'dejavuserif', 'cm', 'stix', 'stixsans' and 'custom'.
Alternatively, a font may be specified using the absolute path to a font file, by using the fname kwarg. However, in this case, it is typically simpler to just pass the path (as a pathlib.Path
, not a :None:None:`str`
) to the font kwarg of the :None:None:`.Text`
object.
The preferred usage of font sizes is to use the relative values, e.g., 'large', instead of absolute font sizes, e.g., 12. This approach allows all text sizes to be made larger or smaller based on the font manager's default font size.
This class will also accept a :None:None:`fontconfig_`
:None:None:`pattern_`
, if it is the only argument provided. This support does not depend on fontconfig; we are merely borrowing its pattern syntax for use here.
<Unimplemented 'target' '.. _fontconfig: https://www.freedesktop.org/wiki/Software/fontconfig/'>
<Unimplemented 'target' '.. _pattern:\n https://www.freedesktop.org/software/fontconfig/fontconfig-user.html'>
Note that Matplotlib's internal font manager and fontconfig use a different algorithm to lookup fonts, so the results of the same pattern may be different in Matplotlib than in other applications that use fontconfig.
A class for storing and manipulating font properties.
The following pages refer to to this document either explicitly or contain code examples using this.
matplotlib.artist.Text.set
matplotlib.pyplot.figtext
matplotlib.figure.FigureBase.text
matplotlib.backend_bases.RendererBase.get_text_width_height_descent
matplotlib.font_manager.FontManager.findfont
matplotlib.artist.Annotation.set
matplotlib.table.Cell.set_text_props
matplotlib.font_manager.FontManager
matplotlib.figure.FigureBase.supylabel
matplotlib.axes._axes.Axes.quiverkey
matplotlib.pyplot.quiverkey
matplotlib.figure.FigureBase._suplabels
matplotlib.figure.FigureBase.suptitle
matplotlib.table.Cell.__init__
matplotlib.figure.FigureBase.supxlabel
matplotlib.text.Text.__init__
matplotlib.fontconfig_pattern.FontconfigPatternParser.parse
matplotlib.quiver.QuiverKey.__init__
matplotlib.pyplot.suptitle
matplotlib.pyplot.text
matplotlib.artist.ClabelText.set
matplotlib.axes._axes.Axes.text
matplotlib.mathtext.MathTextParser.parse
matplotlib.font_manager
Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.
Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)
SVG is more flexible but power hungry; and does not scale well to 50 + nodes.
All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them