From f15ad26829373c0eab6441ec4990cccf7c0074a4 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Thu, 6 Feb 2025 22:15:08 -0500 Subject: [PATCH] Backport PR #25801: Remove some examples from Userdemo --- doc/users/prev_whats_new/whats_new_1.0.rst | 4 ++-- .../gridspec_customization.py} | 8 +++++--- .../subplot2grid.py} | 11 +++++++---- 3 files changed, 14 insertions(+), 9 deletions(-) rename galleries/examples/{userdemo/demo_gridspec03.py => subplots_axes_and_figures/gridspec_customization.py} (88%) rename galleries/examples/{userdemo/demo_gridspec01.py => subplots_axes_and_figures/subplot2grid.py} (77%) diff --git a/doc/users/prev_whats_new/whats_new_1.0.rst b/doc/users/prev_whats_new/whats_new_1.0.rst index c8da886c9097..772f241f4b23 100644 --- a/doc/users/prev_whats_new/whats_new_1.0.rst +++ b/doc/users/prev_whats_new/whats_new_1.0.rst @@ -26,8 +26,8 @@ doing complex subplot layouts, featuring row and column spans and more. See :ref:`arranging_axes` for a tutorial overview. -.. figure:: ../../gallery/userdemo/images/sphx_glr_demo_gridspec01_001.png - :target: ../../gallery/userdemo/demo_gridspec01.html +.. figure:: ../../gallery/subplots_axes_and_figures/images/sphx_glr_subplot2grid_001.png + :target: ../../gallery/subplots_axes_and_figures/subplot2grid.html :align: center :scale: 50 diff --git a/galleries/examples/userdemo/demo_gridspec03.py b/galleries/examples/subplots_axes_and_figures/gridspec_customization.py similarity index 88% rename from galleries/examples/userdemo/demo_gridspec03.py rename to galleries/examples/subplots_axes_and_figures/gridspec_customization.py index 63951ef7d563..08b2dfd45474 100644 --- a/galleries/examples/userdemo/demo_gridspec03.py +++ b/galleries/examples/subplots_axes_and_figures/gridspec_customization.py @@ -1,13 +1,15 @@ """ -============= -GridSpec demo -============= +======================================== +GridSpec with variable sizes and spacing +======================================== This example demonstrates the use of `.GridSpec` to generate subplots, the control of the relative sizes of subplots with *width_ratios* and *height_ratios*, and the control of the spacing around and between subplots using subplot params (*left*, *right*, *bottom*, *top*, *wspace*, and *hspace*). + +.. redirect-from:: /gallery/userdemo/demo_gridspec03 """ import matplotlib.pyplot as plt diff --git a/galleries/examples/userdemo/demo_gridspec01.py b/galleries/examples/subplots_axes_and_figures/subplot2grid.py similarity index 77% rename from galleries/examples/userdemo/demo_gridspec01.py rename to galleries/examples/subplots_axes_and_figures/subplot2grid.py index 7153b136f080..cd500ccf65b2 100644 --- a/galleries/examples/userdemo/demo_gridspec01.py +++ b/galleries/examples/subplots_axes_and_figures/subplot2grid.py @@ -1,11 +1,14 @@ """ -================= -subplot2grid demo -================= +============ +subplot2grid +============ This example demonstrates the use of `.pyplot.subplot2grid` to generate subplots. Using `.GridSpec`, as demonstrated in -:doc:`/gallery/userdemo/demo_gridspec03` is generally preferred. +:doc:`/gallery/subplots_axes_and_figures/gridspec_customization` is +generally preferred. + +.. redirect-from:: /gallery/userdemo/demo_gridspec01 """ import matplotlib.pyplot as plt