Skip to content

Commit a0d5b0a

Browse files
committed
DOC: Remove simple_legend examples from User Demo
The same plots are contained in the legend guide at https://matplotlib.org/devdocs/users/explain/axes/legend_guide.html#legend-location https://matplotlib.org/devdocs/users/explain/axes/legend_guide.html#multiple-legends-on-the-same-axes And there, they aleady have accompanying descriptions. Instead of moving these examples to the text_labels_and_annotations section, I've decided to remove them and instead link the existing legend examples with a see also to the legend guide. I believe this is more helpful than having more uncommented legend examples.
1 parent 33dbc47 commit a0d5b0a

File tree

6 files changed

+20
-48
lines changed

6 files changed

+20
-48
lines changed

galleries/examples/text_labels_and_annotations/figlegend_demo.py

+6
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,9 @@
2525
# %%
2626
# The outside positioning is discussed in detail here:
2727
# https://matplotlib.org/stable/users/explain/axes/legend_guide.html#figure-legends
28+
#
29+
#
30+
# .. seealso::
31+
#
32+
# The :ref:`legend_guide` contains an in depth discussion on the configuration
33+
# options for legends.

galleries/examples/text_labels_and_annotations/legend.py

+5
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,8 @@
3737
#
3838
# - `matplotlib.axes.Axes.plot` / `matplotlib.pyplot.plot`
3939
# - `matplotlib.axes.Axes.legend` / `matplotlib.pyplot.legend`
40+
#
41+
# .. seealso::
42+
#
43+
# The :ref:`legend_guide` contains an in depth discussion on the configuration
44+
# options for legends.

galleries/examples/text_labels_and_annotations/legend_demo.py

+7
Original file line numberDiff line numberDiff line change
@@ -178,3 +178,10 @@ def create_artists(self, legend, orig_handle,
178178
handlelength=2.5, handleheight=3)
179179

180180
plt.show()
181+
182+
# %%
183+
#
184+
# .. seealso::
185+
#
186+
# The :ref:`legend_guide` contains an in depth discussion on the configuration
187+
# options for legends.

galleries/examples/userdemo/simple_legend01.py

-25
This file was deleted.

galleries/examples/userdemo/simple_legend02.py

-23
This file was deleted.

galleries/users_explain/axes/legend_guide.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
"""
22
.. redirect-from:: /tutorials/intermediate/legend_guide
3+
.. redirect-from:: /galleries/examples/userdemo/simple_legend01
4+
.. redirect-from:: /galleries/examples/userdemo/simple_legend02
35
46
.. _legend_guide:
57

0 commit comments

Comments
 (0)