From b0d37393d7d1bc3d25aae12c8653f7fe4984d4bd Mon Sep 17 00:00:00 2001 From: hannah Date: Wed, 10 Jan 2024 21:21:29 -0500 Subject: [PATCH] moved labeling donut tutorial to tutorials remove user guide tutorials and add annotation to tutorials landing page --- galleries/tutorials/index.rst | 97 ++++++++----------- .../pie_and_donut_labels.py | 5 + 2 files changed, 48 insertions(+), 54 deletions(-) rename galleries/{examples/pie_and_polar_charts => tutorials}/pie_and_donut_labels.py (96%) diff --git a/galleries/tutorials/index.rst b/galleries/tutorials/index.rst index ace37dcb6f57..a89ced4ad511 100644 --- a/galleries/tutorials/index.rst +++ b/galleries/tutorials/index.rst @@ -3,17 +3,32 @@ Tutorials ========= -This page contains a few tutorials for using Matplotlib. For the old tutorials, see :ref:`below `. +Walk-throughs of building visualizations that incorporate multiple features of the +library. + + +.. attention:: + + We're re-organizing! Please nominate :ref:`examples ` that you think are good + tutorials and propose new ones by opening an + :ref:`issue or pull request `! + + If you are unsure of what we consider a tutorial, see our + :ref:`content guide ` and ask on our + :ref:`communication ` + + +To learn more about Matplotlib, see the :ref:`user guide ` and +:ref:`community resources `. For examples, see the +:ref:`examples-index` gallery. -For shorter examples, see our :ref:`examples page `. -You can also find :ref:`external resources ` and -a :ref:`FAQ ` in our :ref:`user guide `. .. raw:: html
+.. pyplot tutorial .. raw:: html @@ -31,6 +46,7 @@ a :ref:`FAQ ` in our :ref:`user guide `.
Pyplot tutorial
+.. images .. raw:: html @@ -49,6 +65,8 @@ a :ref:`FAQ ` in our :ref:`user guide `. +.. lifecycle + .. raw:: html
@@ -65,6 +83,7 @@ a :ref:`FAQ ` in our :ref:`user guide `.
The Lifecycle of a Plot
+.. artist .. raw:: html @@ -83,6 +102,25 @@ a :ref:`FAQ ` in our :ref:`user guide `. +.. annotation + +.. raw:: html + +
+ +.. only:: html + + .. image:: /tutorials/images/thumb/sphx_glr_pie_and_donut_labels_thumb.png + :alt: Labeling and annotating pie and donut charts. + + :ref:`sphx_glr_tutorials_pie_and_donut_labels.py` + +.. raw:: html + +
Labeling a pie and a donut
+
+ + .. raw:: html @@ -95,6 +133,7 @@ a :ref:`FAQ ` in our :ref:`user guide `. /tutorials/images /tutorials/lifecycle /tutorials/artists + /tutorials/pie_and_donut_labels .. only:: html @@ -107,53 +146,3 @@ a :ref:`FAQ ` in our :ref:`user guide `. .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download all examples in Jupyter notebooks: tutorials_jupyter.zip ` - - - -.. _user_guide_tutorials: - -User guide tutorials --------------------- - -Many of our tutorials were moved from this section to :ref:`users-guide-index`: - -Introductory -^^^^^^^^^^^^ - -- :ref:`quick_start` -- :ref:`customizing` -- :ref:`animations` - -Intermediate -^^^^^^^^^^^^ - -- :ref:`legend_guide` -- :ref:`color_cycle` -- :ref:`constrainedlayout_guide` -- :ref:`tight_layout_guide` -- :ref:`arranging_axes` -- :ref:`autoscale` -- :ref:`imshow_extent` - -Advanced -^^^^^^^^ - -- :ref:`blitting` -- :ref:`paths` -- :ref:`patheffects_guide` -- :ref:`transforms_tutorial` - -Colors -^^^^^^ - -See :ref:`tutorials-colors`. - -Text -^^^^ - -See :ref:`tutorials-text`. - -Toolkits -^^^^^^^^ - -See :ref:`tutorials-toolkits`. diff --git a/galleries/examples/pie_and_polar_charts/pie_and_donut_labels.py b/galleries/tutorials/pie_and_donut_labels.py similarity index 96% rename from galleries/examples/pie_and_polar_charts/pie_and_donut_labels.py rename to galleries/tutorials/pie_and_donut_labels.py index ae9b805cf005..c9d3b192ce06 100644 --- a/galleries/examples/pie_and_polar_charts/pie_and_donut_labels.py +++ b/galleries/tutorials/pie_and_donut_labels.py @@ -1,4 +1,8 @@ """ +.. redirect-from:: /gallery/pie_and_polar_charts/pie_and_donut_labels + +.. _pie_donut_labels: + ========================== Labeling a pie and a donut ========================== @@ -122,6 +126,7 @@ def func(pct, allvals): # the ingredients would suffice for around 6 donuts - producing one huge # donut is untested and might result in kitchen errors. +# .. tags:: plot-type: pie, component: annotation, level: beginner # %% #