@@ -452,6 +452,9 @@ There is no API level control of the hacth linewidth.
452452Fonts
453453=====
454454
455+ Normal text
456+ -----------
457+
455458The default font has changed from "Bitstream Vera Sans" to "DejaVu
456459Sans". "DejaVu Sans" is an improvement on "Bistream Vera Sans" that
457460adds more international and math characters, but otherwise has the
@@ -484,12 +487,57 @@ sub-set of emoji symbols
484487See the `DejaVu Sans PDF sample for full coverage
485488<http://dejavu.sourceforge.net/samples/DejaVuSans.pdf> `__.
486489
490+ Math text
491+ ---------
492+
487493The default math font when using the built-in math rendering engine
488494(mathtext) has changed from "Computer Modern" (i.e. LaTeX-like) to
489- "DejaVu Sans". To revert to the old behavior, set the ``rcParam ``
490- ``mathtext.fontset `` to ``cm ``. This change has no effect if the
495+ "DejaVu Sans". This change has no effect if the
491496TeX backend is used (i.e. ``text.usetex `` is ``True ``).
492497
498+
499+ .. plot ::
500+
501+ import matplotlib.pyplot as plt
502+ import matplotlib as mpl
503+
504+ mpl.rcParams['mathtext.fontset'] = 'cm'
505+
506+ fig, ax = plt.subplots(tight_layout=True, figsize=(3, 3))
507+
508+ ax.plot(range(15), label='int: $15 \i nt_0^\i nfty dx$')
509+ ax.legend()
510+ ax.set_title('classic')
511+
512+
513+ .. plot ::
514+
515+ import matplotlib.pyplot as plt
516+ import matplotlib as mpl
517+
518+ fig, ax = plt.subplots(tight_layout=True, figsize=(3, 3))
519+
520+ ax.plot(range(15), label='int: $15 \i nt_0^\i nfty dx$')
521+ ax.legend()
522+ ax.set_title('v2.0')
523+
524+
525+
526+ To revert to the old behavior set the::
527+
528+ mpl.rcParams['mathtext.fontset'] = 'cm'
529+
530+ or by setting::
531+
532+ mathetxt.fontset: cm
533+
534+ in your :file: `matplotlibrc ` file.
535+
536+ This ``rcParam `` is consulted when the text is drawn, not when the
537+ artist is created. Thus all mathtext on a given ``canvas `` will use the
538+ same fontset.
539+
540+
493541Legends
494542=======
495543
0 commit comments