Skip to content

Add sentence to textprops tutorial mentioning mathtext rcParams #8853

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 11, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion tutorials/text/mathtext.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
to generate their text (see :ref:`sphx_glr_tutorials_text_usetex.py`).
"""

###############################################################################
# Any text element can use math text. You should use raw strings (precede the
# quotes with an ``'r'``), and surround the math text with dollar signs ($), as in
# TeX. Regular text and mathtext can be interleaved within the same string.
Expand All @@ -32,7 +33,7 @@
# <http://thread.gmane.org/gmane.comp.python.matplotlib.general/19963/focus=19978>`_.
#
# Here is a simple example::

#
# # plain text
# plt.title('alpha > beta')
#
Expand Down Expand Up @@ -151,6 +152,8 @@
#
# \sqrt[3]{x}
#
# .. _mathtext-fonts:
#
# Fonts
# -----
#
Expand Down
6 changes: 4 additions & 2 deletions tutorials/text/text_props.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,9 @@
# Default Font
# ==============
#
# The base default font is controlled by a set of rcParams:
# The base default font is controlled by a set of rcParams. To set the font
# for mathematical expressions, use the rcParams beginning with ``mathtext``
# (see :ref:`mathtext <mathtext-fonts>`).
#
# +---------------------+----------------------------------------------------+
# | rcParam | usage |
Expand Down Expand Up @@ -212,7 +214,7 @@
#
# or set it in your :file:`.matplotlibrc` file::
#
# font.sans-serif: Source Han Sans TW, Ariel, sans-serif
# font.sans-serif: Source Han Sans TW, Arial, sans-serif
#
# To control the font used on per-artist basis use the ``'name'``,
# ``'fontname'`` or ``'fontproperties'`` kwargs documented :ref:`above
Expand Down