From fafca1da9429af2859e48adce3b29ce97b29be9c Mon Sep 17 00:00:00 2001 From: Sigma-Verma <131307209+Sigma-Verma@users.noreply.github.com> Date: Thu, 20 Apr 2023 05:17:53 +0530 Subject: [PATCH 1/6] Update Replace usage of WenQuanYi Zen Hei by Noto Sans CJK #25724 --- doc/devel/dependencies.rst | 2 +- doc/users/prev_whats_new/whats_new_3.6.0.rst | 4 ++-- galleries/users_explain/text/fonts.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/devel/dependencies.rst b/doc/devel/dependencies.rst index 453178ebcc08..281fac52592d 100644 --- a/doc/devel/dependencies.rst +++ b/doc/devel/dependencies.rst @@ -252,7 +252,7 @@ testing the following will be used if they are installed. - pytest-xvfb_ to run tests without windows popping up (Linux) - pytz_ used to test pytz int - sphinx_ used to test our sphinx extensions -- WenQuanYi Zen Hei and `Noto Sans CJK `_ +- `Noto Sans CJK `_ fonts for testing font fallback and non-western fonts - xarray_ used to test compatibility with xarray 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..785be6285c2a 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,10 @@ 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.85, text, family=["Noto Sans CJK"]) 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"]) + fig.text(0.05, 0.25, text, family=["DejaVu Sans", "Noto Sans CJK"]) 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..669c5664efed 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'], ha='center' ) From 100bc4194e7fcddb032cddc0708b86779688a4d5 Mon Sep 17 00:00:00 2001 From: Sigma-Verma <131307209+Sigma-Verma@users.noreply.github.com> Date: Thu, 20 Apr 2023 06:22:17 +0530 Subject: [PATCH 2/6] Update dependencies.rst --- doc/devel/dependencies.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/devel/dependencies.rst b/doc/devel/dependencies.rst index 281fac52592d..9a589fc58db9 100644 --- a/doc/devel/dependencies.rst +++ b/doc/devel/dependencies.rst @@ -252,7 +252,7 @@ testing the following will be used if they are installed. - pytest-xvfb_ to run tests without windows popping up (Linux) - pytz_ used to test pytz int - sphinx_ used to test our sphinx extensions -- `Noto Sans CJK `_ +- WenQuanYi Zen Hei and `Noto Sans CJK `_ fonts for testing font fallback and non-western fonts - xarray_ used to test compatibility with xarray From 28dd67042432a44d4dcdb280916d4f6097b01ba4 Mon Sep 17 00:00:00 2001 From: Sigma-Verma <131307209+Sigma-Verma@users.noreply.github.com> Date: Thu, 20 Apr 2023 06:24:35 +0530 Subject: [PATCH 3/6] Update whats_new_3.6.0.rst --- doc/users/prev_whats_new/whats_new_3.6.0.rst | 2 -- 1 file changed, 2 deletions(-) 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 785be6285c2a..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=["Noto Sans CJK"]) 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", "Noto Sans CJK"]) This currently works with the Agg (and all of the GUI embeddings), svg, pdf, ps, and inline backends. From 69c8d946c7c5dae79a789df9f2d3d1ecd3744fa2 Mon Sep 17 00:00:00 2001 From: Sigma-Verma <131307209+Sigma-Verma@users.noreply.github.com> Date: Thu, 20 Apr 2023 18:05:12 +0530 Subject: [PATCH 4/6] Update dependencies.rst --- doc/devel/dependencies.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/devel/dependencies.rst b/doc/devel/dependencies.rst index 9a589fc58db9..453178ebcc08 100644 --- a/doc/devel/dependencies.rst +++ b/doc/devel/dependencies.rst @@ -252,7 +252,7 @@ testing the following will be used if they are installed. - pytest-xvfb_ to run tests without windows popping up (Linux) - pytz_ used to test pytz int - sphinx_ used to test our sphinx extensions -- WenQuanYi Zen Hei and `Noto Sans CJK `_ +- WenQuanYi Zen Hei and `Noto Sans CJK `_ fonts for testing font fallback and non-western fonts - xarray_ used to test compatibility with xarray From cb1d3c9f91f5008fdae350ceee842dd6e7500517 Mon Sep 17 00:00:00 2001 From: Sigma-Verma <131307209+Sigma-Verma@users.noreply.github.com> Date: Fri, 21 Apr 2023 03:27:17 +0530 Subject: [PATCH 5/6] Update fonts.py --- galleries/users_explain/text/fonts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/galleries/users_explain/text/fonts.py b/galleries/users_explain/text/fonts.py index 669c5664efed..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', 'Noto Sans CJK'], + family=['DejaVu Sans', 'Noto Sans CJK JP'], ha='center' ) From eadb958073dbc920c50bd17137e834ee6bc88fd8 Mon Sep 17 00:00:00 2001 From: Sigma-Verma <131307209+Sigma-Verma@users.noreply.github.com> Date: Thu, 11 May 2023 20:03:21 +0530 Subject: [PATCH 6/6] Remove userdemo section and convert examples to figures #25800 To address this issue, the proposed fix is to convert the examples in the userdemo section from literalinclude to figure directives if they are still used in the documentation. This will allow the examples to be displayed as figures rather than code snippets --- galleries/users_explain/text/pgf.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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