Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8fac114

Browse files
authored
Merge pull request #8853 from geib7592/doc_textprops
Add sentence to textprops tutorial mentioning mathtext rcParams
2 parents cf0a400 + cc8b85e commit 8fac114

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

tutorials/text/mathtext.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
to generate their text (see :ref:`sphx_glr_tutorials_text_usetex.py`).
1616
"""
1717

18+
###############################################################################
1819
# Any text element can use math text. You should use raw strings (precede the
1920
# quotes with an ``'r'``), and surround the math text with dollar signs ($), as in
2021
# TeX. Regular text and mathtext can be interleaved within the same string.
@@ -32,7 +33,7 @@
3233
# <http://thread.gmane.org/gmane.comp.python.matplotlib.general/19963/focus=19978>`_.
3334
#
3435
# Here is a simple example::
35-
36+
#
3637
# # plain text
3738
# plt.title('alpha > beta')
3839
#
@@ -151,6 +152,8 @@
151152
#
152153
# \sqrt[3]{x}
153154
#
155+
# .. _mathtext-fonts:
156+
#
154157
# Fonts
155158
# -----
156159
#

tutorials/text/text_props.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,9 @@
143143
# Default Font
144144
# ==============
145145
#
146-
# The base default font is controlled by a set of rcParams:
146+
# The base default font is controlled by a set of rcParams. To set the font
147+
# for mathematical expressions, use the rcParams beginning with ``mathtext``
148+
# (see :ref:`mathtext <mathtext-fonts>`).
147149
#
148150
# +---------------------+----------------------------------------------------+
149151
# | rcParam | usage |
@@ -212,7 +214,7 @@
212214
#
213215
# or set it in your :file:`.matplotlibrc` file::
214216
#
215-
# font.sans-serif: Source Han Sans TW, Ariel, sans-serif
217+
# font.sans-serif: Source Han Sans TW, Arial, sans-serif
216218
#
217219
# To control the font used on per-artist basis use the ``'name'``,
218220
# ``'fontname'`` or ``'fontproperties'`` kwargs documented :ref:`above

0 commit comments

Comments
 (0)