Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d5db532

Browse files
committed
DOC: move tutorials [ci doc]
1 parent 4da460e commit d5db532

File tree

19 files changed

+196
-74
lines changed

19 files changed

+196
-74
lines changed

.flake8

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,13 @@ per-file-ignores =
6060
galleries/users_explain/artists/transforms_tutorial.py: E402, E501
6161
galleries/users_explain/colors/colormaps.py: E501
6262
galleries/users_explain/colors/colors.py: E402
63-
galleries/tutorials/intermediate/artists.py: E402
63+
galleries/tutorials/artists.py: E402
6464
galleries/users_explain/axes/constrainedlayout_guide.py: E402
6565
galleries/users_explain/axes/legend_guide.py: E402
6666
galleries/users_explain/axes/tight_layout_guide.py: E402
6767
galleries/users_explain/animations/animations.py: E501
68-
galleries/tutorials/introductory/images.py: E501
69-
galleries/tutorials/introductory/pyplot.py: E402, E501
68+
galleries/tutorials/images.py: E501
69+
galleries/tutorials/pyplot.py: E402, E501
7070
galleries/users_explain/text/annotations.py: E402, E501
7171
galleries/users_explain/text/mathtext.py: E501
7272
galleries/users_explain/text/text_intro.py: E402

doc/api/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ programmatic plot generation.
7575
Further reading:
7676

7777
- The `matplotlib.pyplot` function reference
78-
- :doc:`/tutorials/introductory/pyplot`
78+
- :ref:`pyplot_tutorial`
7979
- :ref:`Pyplot examples <pyplots_examples>`
8080

8181
.. _api-index:

doc/index.rst

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Learning resources
5151

5252
- :ref:`Quick-start guide <quick_start>`
5353
- :doc:`Plot types <plot_types/index>`
54-
- :ref:`Introductory tutorials <tutorials-introductory>`
54+
- :ref:`users-guide-using`
5555
- :doc:`External learning resources <users/resources/index>`
5656

5757
.. grid-item-card::
@@ -69,11 +69,8 @@ Learning resources
6969
Understand how Matplotlib works
7070
^^^
7171

72-
- The :ref:`users-guide-explain` in the :doc:`Users guide
73-
<users/index>`
74-
- Many of the :ref:`Intermediate <tutorials-intermediate>` and
75-
:ref:`Advanced <tutorials-advanced>` tutorials have explanatory
76-
material
72+
- :ref:`users-guide-explain` in the :doc:`Users guide
73+
<users/index>` has a number of advanced topics.
7774

7875
.. grid-item-card::
7976
:padding: 2

doc/users/faq/howto_faq.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ actually perform such a rendering and inspect the result.
9797
Find all objects in a figure of a certain type
9898
----------------------------------------------
9999

100-
Every Matplotlib artist (see :doc:`/tutorials/intermediate/artists`) has a method
100+
Every Matplotlib artist (see :ref:`artists_tutorial`) has a method
101101
called :meth:`~matplotlib.artist.Artist.findobj` that can be used to
102102
recursively search the artist for any artists it may contain that meet
103103
some criteria (e.g., match all :class:`~matplotlib.lines.Line2D`

doc/users/prev_whats_new/whats_new_0.99.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ New documentation
1313

1414
Jae-Joon Lee has written two new guides :ref:`legend_guide`
1515
and :ref:`plotting-guide-annotation`. Michael Sarahan has written
16-
:doc:`/tutorials/introductory/images`. John Hunter has written two new tutorials on
16+
:ref:`image_tutorial`. John Hunter has written two new tutorials on
1717
working with paths and transformations: :ref:`paths` and
1818
:ref:`transforms_tutorial`.
1919

doc/users/project/history.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,10 @@ The Matplotlib code is conceptually divided into three parts: the
6868
*pylab interface* is the set of functions provided by
6969
:mod:`pylab` which allow the user to create plots with code
7070
quite similar to MATLAB figure generating code
71-
(:doc:`/tutorials/introductory/pyplot`). The *Matplotlib frontend* or *Matplotlib
71+
(:ref:`pyplot_tutorial`). The *Matplotlib frontend* or *Matplotlib
7272
API* is the set of classes that do the heavy lifting, creating and
7373
managing figures, text, lines, plots and so on
74-
(:doc:`/tutorials/intermediate/artists`). This is an abstract interface that knows
74+
(:ref:`artists_tutorial`). This is an abstract interface that knows
7575
nothing about output. The *backends* are device-dependent drawing
7676
devices, aka renderers, that transform the frontend representation to
7777
hardcopy or a display device (:ref:`what-is-a-backend`). Example

galleries/tutorials/README.txt

Lines changed: 0 additions & 12 deletions
This file was deleted.

galleries/tutorials/advanced/README.txt

Lines changed: 0 additions & 7 deletions
This file was deleted.

galleries/tutorials/intermediate/artists.py renamed to galleries/tutorials/artists.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
"""
2+
.. redirect-from:: /tutorials/intermediate/artists
3+
4+
.. _artists_tutorial:
5+
26
===============
37
Artist tutorial
48
===============
@@ -716,6 +720,6 @@ class in the Matplotlib API, and the one you will be working with most
716720
# dollar signs and colors them green on the right side of the yaxis.
717721
#
718722
#
719-
# .. include:: ../../gallery/ticks/dollar_ticks.rst
723+
# .. include:: ../gallery/ticks/dollar_ticks.rst
720724
# :start-after: .. redirect-from:: /gallery/pyplots/dollar_ticks
721725
# :end-before: .. admonition:: References

galleries/tutorials/introductory/images.py renamed to galleries/tutorials/images.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
"""
2+
.. redirect-from:: /tutorials/introductory/images
3+
4+
.. _image_tutorial:
5+
26
==============
37
Image tutorial
48
==============
@@ -65,7 +69,7 @@
6569
#
6670
# Here's the image we're going to play with:
6771
#
68-
# .. image:: ../../_static/stinkbug.png
72+
# .. image:: ../_static/stinkbug.png
6973
#
7074
# It's a 24-bit RGB PNG image (8 bits for each of R, G, B). Depending
7175
# on where you get your data, the other kinds of image that you'll most
@@ -78,7 +82,7 @@
7882
# convert the `PIL.Image.Image` object into an 8-bit (``dtype=uint8``) numpy
7983
# array.
8084

81-
img = np.asarray(Image.open('../../../doc/_static/stinkbug.png'))
85+
img = np.asarray(Image.open('../../doc/_static/stinkbug.png'))
8286
print(repr(img))
8387

8488
# %%
@@ -227,7 +231,7 @@
227231
# We'll use the Pillow library that we used to load the image also to resize
228232
# the image.
229233

230-
img = Image.open('../../../doc/_static/stinkbug.png')
234+
img = Image.open('../../doc/_static/stinkbug.png')
231235
img.thumbnail((64, 64)) # resizes image in-place
232236
imgplot = plt.imshow(img)
233237

0 commit comments

Comments
 (0)