Skip to content

Commit

Permalink
Merge pull request #21644 from meeseeksmachine/auto-backport-of-pr-21…
Browse files Browse the repository at this point in the history
…640-on-v3.5.x

Backport PR #21640 on branch v3.5.x (DOC: remove sample_plots from tutorials)
  • Loading branch information
QuLogic committed Nov 15, 2021
2 parents 6ada23b + 6fc155f commit a34a511
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 400 deletions.
44 changes: 22 additions & 22 deletions doc/devel/documenting_mpl.rst
Expand Up @@ -10,34 +10,34 @@ Getting started
General file structure
----------------------

All documentation is built from the :file:`doc/`. The :file:`doc/`
directory contains configuration files for Sphinx and reStructuredText
All documentation is built from the :file:`doc/`. The :file:`doc/`
directory contains configuration files for Sphinx and reStructuredText
(ReST_; ``.rst``) files that are rendered to documentation pages.

Documentation is created in three ways. First, API documentation
Documentation is created in three ways. First, API documentation
(:file:`doc/api`) is created by Sphinx_ from
the docstrings of the classes in the Matplotlib library. Except for
:file:`doc/api/api_changes/`, ``.rst`` files in :file:`doc/api` are created
:file:`doc/api/api_changes/`, ``.rst`` files in :file:`doc/api` are created
when the documentation is built. See :ref:`writing-docstrings` below.

Second, the contents of :file:`doc/plot_types`, :file:`doc/gallery` and
:file:`doc/tutorials` are generated by the `Sphinx Gallery`_ from python
files in :file:`plot_types/`, :file:`examples/` and :file:`tutorials/`.
These sources consist of python scripts that have ReST_ documentation built
into their comments. See :ref:`writing-examples-and-tutorials` below.
Second, the contents of :file:`doc/plot_types`, :file:`doc/gallery` and
:file:`doc/tutorials` are generated by the `Sphinx Gallery`_ from python
files in :file:`plot_types/`, :file:`examples/` and :file:`tutorials/`.
These sources consist of python scripts that have ReST_ documentation built
into their comments. See :ref:`writing-examples-and-tutorials` below.

Third, Matplotlib has narrative docs written in ReST_ in subdirectories of
:file:`doc/users/`. If you would like to add new documentation that is suited
to an ``.rst`` file rather than a gallery or tutorial example, choose an
appropriate subdirectory to put it in, and add the file to the table of
contents of :file:`index.rst` of the subdirectory. See
:ref:`writing-rest-pages` below.
Third, Matplotlib has narrative docs written in ReST_ in subdirectories of
:file:`doc/users/`. If you would like to add new documentation that is suited
to an ``.rst`` file rather than a gallery or tutorial example, choose an
appropriate subdirectory to put it in, and add the file to the table of
contents of :file:`index.rst` of the subdirectory. See
:ref:`writing-rest-pages` below.

.. note::

Don't directly edit the ``.rst`` files in :file:`doc/plot_types`,
:file:`doc/gallery`, :file:`doc/tutorials`, and :file:`doc/api`
(excepting :file:`doc/api/api_changes/`). Sphinx_ regenerates
:file:`doc/gallery`, :file:`doc/tutorials`, and :file:`doc/api`
(excepting :file:`doc/api/api_changes/`). Sphinx_ regenerates
files in these directories when building documentation.

Setting up the doc build
Expand Down Expand Up @@ -199,15 +199,15 @@ Documents can be linked with the ``:doc:`` directive:
See the :doc:`/users/faq/installing_faq`
See the tutorial :doc:`/tutorials/introductory/sample_plots`
See the tutorial :doc:`/tutorials/introductory/usage`
See the example :doc:`/gallery/lines_bars_and_markers/simple_plot`
will render as:

See the :doc:`/users/faq/installing_faq`

See the tutorial :doc:`/tutorials/introductory/sample_plots`
See the tutorial :doc:`/tutorials/introductory/usage`

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

Expand Down Expand Up @@ -1022,10 +1022,10 @@ Example:
Navbar and style
----------------

Matplotlib has a few subprojects that share the same navbar and style, so these
Matplotlib has a few subprojects that share the same navbar and style, so these
are centralized as a sphinx theme at
`mpl_sphinx_theme <https://github.com/matplotlib/mpl-sphinx-theme>`_. Changes to the
style or topbar should be made there to propagate across all subprojects.
`mpl_sphinx_theme <https://github.com/matplotlib/mpl-sphinx-theme>`_. Changes to the
style or topbar should be made there to propagate across all subprojects.

.. TODO: Add section about uploading docs
Expand Down
8 changes: 5 additions & 3 deletions plot_types/README.rst
@@ -1,10 +1,12 @@
.. _plot_types:

.. redirect-from:: /tutorials/basic/sample_plots

Plot types
==========

Overview of many common plotting commands in Matplotlib.

Note that we have stripped all labels, but they are present by default.
See the `gallery <../gallery/index.html>`_ for many more examples and
the `tutorials page <../tutorials/index.html>`_ for longer examples.
Note that we have stripped all labels, but they are present by default.
See the `gallery <../gallery/index.html>`_ for many more examples and
the `tutorials page <../tutorials/index.html>`_ for longer examples.

0 comments on commit a34a511

Please sign in to comment.