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

Skip to content

Commit 44a1c2d

Browse files
jklymakImgBotApp
authored andcommitted
DOC: user/explain reorg (and moving a lot of tutorials). (matplotlib#25395)
* DOC: make users/explain a sphinx gallery [ci doc] This is a major re-org whereby much of galleries/tutorials is moved to galleries/user_explain, and hence users/explain in the published docs. Much of this may be rearranged more over the 3.8 cycle. Additionally most tutorial references were moved from hard :doc: references to soft :ref: references for ease of further rearrangement. Note this uses the git head of sphinx-gallery and mpl-sphinx-theme. We should watch the release cycle of sphinx-gallery so that it can be changed to one of their releases.
1 parent b622548 commit 44a1c2d

131 files changed

Lines changed: 1753 additions & 1317 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

doc/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ clean:
2222
rm -rf "$(SOURCEDIR)/gallery"
2323
rm -rf "$(SOURCEDIR)/plot_types"
2424
rm -rf "$(SOURCEDIR)/tutorials"
25+
rm -rf "$(SOURCEDIR)/users/explain"
2526
rm -rf "$(SOURCEDIR)/savefig"
2627
rm -rf "$(SOURCEDIR)/sphinxext/__pycache__"
2728
rm -f $(SOURCEDIR)/_static/constrained_layout*.png

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/api/prev_api_changes/api_changes_1.4.x.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ original location:
8888
* The legend handler interface has changed from a callable, to any object
8989
which implements the ``legend_artists`` method (a deprecation phase will
9090
see this interface be maintained for v1.4). See
91-
:doc:`/tutorials/intermediate/legend_guide` for further details. Further legend changes
91+
:ref:`legend_guide` for further details. Further legend changes
9292
include:
9393

9494
* ``matplotlib.axes.Axes._get_legend_handles`` now returns a generator of

doc/api/prev_api_changes/api_changes_2.2.0.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ New dependency
99

1010
`kiwisolver <https://github.com/nucleic/kiwi>`__ is now a required
1111
dependency to support the new constrained_layout, see
12-
:doc:`/tutorials/intermediate/constrainedlayout_guide` for
12+
:ref:`constrainedlayout_guide` for
1313
more details.
1414

1515

doc/api/prev_api_changes/api_changes_3.4.0/behaviour.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ library, so using it should be safe, but layouts may not be exactly the same as
2424
more development takes place.
2525

2626
Details of using ``constrained_layout``, and its algorithm are available at
27-
:doc:`/tutorials/intermediate/constrainedlayout_guide`
27+
:ref:`constrainedlayout_guide`
2828

2929
``plt.subplot`` re-selection without keyword arguments
3030
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

doc/api/style_api.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Styles are predefined sets of `.rcParams` that define the visual appearance of
66
a plot.
77

8-
:doc:`/tutorials/introductory/customizing` describes the mechanism and usage
8+
:ref:`customizing` describes the mechanism and usage
99
of styles.
1010

1111
The :doc:`/gallery/style_sheets/style_sheets_reference` gives an overview of

doc/api/toolkits/mplot3d.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ and feel as regular 2D plots. Not the fastest or most feature complete 3D
1212
library out there, but it ships with Matplotlib and thus may be a lighter
1313
weight solution for some use cases.
1414

15-
See the :doc:`mplot3d tutorial </tutorials/toolkits/mplot3d>` for
15+
See the :ref:`mplot3d tutorial <mplot3d>` for
1616
more information.
1717

1818
.. image:: /_static/demo_mplot3d.png

doc/devel/MEP/MEP29.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Improvements
5454
to use the html.parser from the standard library.
5555

5656
* Computation of text fragment positions could benefit from the OffsetFrom
57-
class. See for example item 5 in `Using Complex Coordinates with Annotations <https://matplotlib.org/devdocs/tutorials/text/annotations.html#using-complex-coordinates-with-annotations>`_
57+
class. See for example item 5 in `Using Complex Coordinates with Annotations <https://matplotlib.org/devdocs/users/explain/text/annotations.html#using-complex-coordinates-with-annotations>`_
5858

5959
Problems
6060
--------

doc/devel/documenting_mpl.rst

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -202,15 +202,15 @@ Documents can be linked with the ``:doc:`` directive:
202202
203203
See the :doc:`/users/installing/index`
204204
205-
See the tutorial :doc:`/tutorials/introductory/quick_start`
205+
See the tutorial :ref:`quick_start`
206206
207207
See the example :doc:`/gallery/lines_bars_and_markers/simple_plot`
208208
209209
will render as:
210210

211211
See the :doc:`/users/installing/index`
212212

213-
See the tutorial :doc:`/tutorials/introductory/quick_start`
213+
See the tutorial :ref:`quick_start`
214214

215215
See the example :doc:`/gallery/lines_bars_and_markers/simple_plot`
216216

@@ -858,10 +858,9 @@ The first comment block is treated as ReST_ text. The other comment blocks
858858
render as comments in :doc:`/gallery/lines_bars_and_markers/simple_plot`.
859859

860860
Tutorials are made with the exact same mechanism, except they are longer, and
861-
typically have more than one comment block (i.e.
862-
:doc:`/tutorials/introductory/quick_start`). The first comment block
863-
can be the same as the example above. Subsequent blocks of ReST text are
864-
delimited by the line ``# %%`` :
861+
typically have more than one comment block (i.e. :ref:`quick_start`). The
862+
first comment block can be the same as the example above. Subsequent blocks of
863+
ReST text are delimited by the line ``# %%`` :
865864

866865
.. code-block:: python
867866

doc/index.rst

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ Learning resources
4949
Tutorials
5050
^^^
5151

52-
- :doc:`Quick-start guide <tutorials/introductory/quick_start>`
52+
- :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

0 commit comments

Comments
 (0)