@@ -9,38 +9,38 @@ properties which can be configured via keyword arguments to the text
99commands (e.g., :func: `~matplotlib.pyplot.title `,
1010:func: `~matplotlib.pyplot.xlabel ` and :func: `~matplotlib.pyplot.text `).
1111
12- ========================== ==============================================================================
12+ ========================== ======================================================================================================================
1313Property Value Type
14- ========================== ==============================================================================
15- alpha float
16- backgroundcolor any matplotlib color
17- bbox rectangle prop dict plus key ``'pad' `` which is a pad in points
14+ ========================== ======================================================================================================================
15+ alpha ` float `
16+ backgroundcolor any matplotlib :ref: ` color < colors >`
17+ bbox ` ~matplotlib.patches.Rectangle ` prop dict plus key ``'pad' `` which is a pad in points
1818clip_box a matplotlib.transform.Bbox instance
1919clip_on [True | False]
20- clip_path a Path instance and a Transform instance, a Patch
21- color any matplotlib color
20+ clip_path a ` ~matplotlib.path. Path` instance and a ` ~matplotlib.transforms. Transform` instance, a ` ~matplotlib.patches. Patch`
21+ color any matplotlib :ref: ` color < colors >`
2222family [ ``'serif' `` | ``'sans-serif' `` | ``'cursive' `` | ``'fantasy' `` | ``'monospace' `` ]
23- fontproperties a matplotlib.font_manager.FontProperties instance
23+ fontproperties a ` ~ matplotlib.font_manager.FontProperties` instance
2424horizontalalignment or ha [ ``'center' `` | ``'right' `` | ``'left' `` ]
2525label any string
26- linespacing float
26+ linespacing ` float `
2727multialignment [``'left' `` | ``'right' `` | ``'center' `` ]
2828name or fontname string e.g., [``'Sans' `` | ``'Courier' `` | ``'Helvetica' `` ...]
2929picker [None|float|boolean|callable]
30- position (x,y)
31- rotation [ angle in degrees ``'vertical' `` | ``'horizontal' ``
30+ position (x, y)
31+ rotation [ angle in degrees | ``'vertical' `` | ``'horizontal' `` ]
3232size or fontsize [ size in points | relative size, e.g., ``'smaller' ``, ``'x-large' `` ]
33- style or fontstyle [ ``'normal' `` | ``'italic' `` | ``'oblique' ``]
33+ style or fontstyle [ ``'normal' `` | ``'italic' `` | ``'oblique' `` ]
3434text string or anything printable with '%s' conversion
35- transform a matplotlib.transform transformation instance
35+ transform a ` ~ matplotlib.transforms.Transform ` instance
3636variant [ ``'normal' `` | ``'small-caps' `` ]
3737verticalalignment or va [ ``'center' `` | ``'top' `` | ``'bottom' `` | ``'baseline' `` ]
3838visible [True | False]
3939weight or fontweight [ ``'normal' `` | ``'bold' `` | ``'heavy' `` | ``'light' `` | ``'ultrabold' `` | ``'ultralight' ``]
40- x float
41- y float
40+ x ` float `
41+ y ` float `
4242zorder any number
43- ========================== ==============================================================================
43+ ========================== ======================================================================================================================
4444
4545
4646You can layout text with the alignment arguments
@@ -100,40 +100,44 @@ The mapping between the family aliases (``{'cursive', 'fantasy',
100100is controlled by the following rcParms
101101
102102
103- +----------------------------+----------------------------------------------------+
104- | ``'serif' `` | ``'font.serif' `` |
105- +----------------------------+----------------------------------------------------+
106- | ``'monospace' `` | ``'font.monospace' `` |
107- +----------------------------+----------------------------------------------------+
108- | ``'fantasy' `` | ``'font.fantasy' `` |
109- +----------------------------+----------------------------------------------------+
110- | ``'cursive'`` | ``'font.cursive' `` |
111- +----------------------------+----------------------------------------------------+
112- | ``{'sans', 'sans serif', | ``'font.sans-serif' `` |
113- | 'sans-serif'}`` | |
114- | | |
115- +----------------------------+----------------------------------------------------+
103+ +------------------------------------------+--------------------------------+
104+ | ``'serif' `` | ``'font.serif' `` |
105+ +------------------------------------------+--------------------------------+
106+ | ``'monospace' `` | ``'font.monospace' `` |
107+ +------------------------------------------+--------------------------------+
108+ | ``'fantasy' `` | ``'font.fantasy' `` |
109+ +------------------------------------------+--------------------------------+
110+ | ``'cursive' `` | ``'font.cursive' `` |
111+ +------------------------------------------+--------------------------------+
112+ | ``{'sans', 'sans serif', 'sans-serif'} `` | ``'font.sans-serif' `` |
113+ +------------------------------------------+--------------------------------+
116114
117115
118116which are lists of font names.
119117
120- Set default font with non-latin code points
121- ===========================================
118+ Text with with non-latin glyphs
119+ ===============================
122120
123- From v2.0 forward the :ref: `default font <default_changes_font >` contains
124- code points for many western languages, but does not cover eastern
125- scripts (ex Chinese, Korean, or Japanese). If you use unicode points
126- not covered by the default font you will see the dreaded 'code point
127- not found' place holder (typically an empty rectangle). To set the
128- default font to be one that support the code points you need prepend
129- the font name to ``'font.family' `` or the desired alias lists ::
121+ As of v2.0 the :ref: `default font <default_changes_font >` contains
122+ glyphs for many western alphabets, but still does not cover all of the
123+ glyphs that may be required by mpl users. For example, DejaVu has no
124+ coverage of Chinese, Korean, or Japanese.
125+
126+
127+ To set the default font to be one that support the code points you
128+ need prepend the font name to ``'font.family' `` or the desired alias
129+ lists ::
130130
131131 matplotlib.rcParams['font.sans-serif'] = ['Source Han Sans TW', 'sans-serif']
132132
133133or set it in your :file: `.matplotlibrc ` file::
134134
135135 font.sans-serif: Source Han Sans TW, Ariel, sans-serif
136136
137+ To control the font used on per-artist basis use the ``'name' ``,
138+ ``'fontname' `` or ``'fontproperties' `` kwargs documented :ref: `above
139+ <text-properties>`.
140+
137141
138142On linux `fc-list <http://linux.die.net/man/1/fc-list >`__ can be a
139143useful tool to discover the font name for example ::
0 commit comments