diff --git a/doc/users/prev_whats_new/whats_new_3.6.0.rst b/doc/users/prev_whats_new/whats_new_3.6.0.rst index 79706376a870..6f62954255b2 100644 --- a/doc/users/prev_whats_new/whats_new_3.6.0.rst +++ b/doc/users/prev_whats_new/whats_new_3.6.0.rst @@ -558,10 +558,8 @@ them in order to locate a required glyph. fig = plt.figure(figsize=(4.75, 1.85)) text = "There are 几个汉字 in between!" - fig.text(0.05, 0.85, text, family=["WenQuanYi Zen Hei"]) fig.text(0.05, 0.65, text, family=["Noto Sans CJK JP"]) fig.text(0.05, 0.45, text, family=["DejaVu Sans", "Noto Sans CJK JP"]) - fig.text(0.05, 0.25, text, family=["DejaVu Sans", "WenQuanYi Zen Hei"]) This currently works with the Agg (and all of the GUI embeddings), svg, pdf, ps, and inline backends. diff --git a/galleries/users_explain/text/fonts.py b/galleries/users_explain/text/fonts.py index 3a4161ae2ef4..0fc57f1f157e 100644 --- a/galleries/users_explain/text/fonts.py +++ b/galleries/users_explain/text/fonts.py @@ -185,7 +185,7 @@ fig, ax = plt.subplots() ax.text( .5, .5, "There are 几个汉字 in between!", - family=['DejaVu Sans', 'WenQuanYi Zen Hei'], + family=['DejaVu Sans', 'Noto Sans CJK JP'], ha='center' ) diff --git a/galleries/users_explain/text/pgf.py b/galleries/users_explain/text/pgf.py index 5dfd7e53f4a0..06165d930042 100644 --- a/galleries/users_explain/text/pgf.py +++ b/galleries/users_explain/text/pgf.py @@ -105,7 +105,7 @@ When saving to ``.pgf``, the font configuration Matplotlib used for the layout of the figure is included in the header of the text file. -.. literalinclude:: /gallery/userdemo/pgf_fonts.py +.. figure :: /gallery/userdemo/pgf_fonts.py :end-before: fig.savefig @@ -122,12 +122,12 @@ .. only:: html - .. literalinclude:: /gallery/userdemo/pgf_preamble_sgskip.py + .. figure :: /gallery/userdemo/pgf_preamble_sgskip.py :end-before: fig.savefig .. only:: latex - .. literalinclude:: /gallery/userdemo/pgf_preamble_sgskip.py + .. figure :: /gallery/userdemo/pgf_preamble_sgskip.py :end-before: import matplotlib.pyplot as plt @@ -141,7 +141,7 @@ Please note that when selecting pdflatex, the fonts and Unicode handling must be configured in the preamble. -.. literalinclude:: /gallery/userdemo/pgf_texsystem.py +.. figure :: /gallery/userdemo/pgf_texsystem.py :end-before: fig.savefig