Skip to content

Backport PR #21640 on branch v3.5.x (DOC: remove sample_plots from tutorials) #21644

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 22 additions & 22 deletions doc/devel/documenting_mpl.rst
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -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.
Loading