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

Skip to content

Commit bfa31a4

Browse files
authored
Merge pull request #19756 from timhoffm/doc-doc
Minor cleanup of documentation guide
2 parents d42acb0 + 7fe56ee commit bfa31a4

File tree

2 files changed

+11
-58
lines changed

2 files changed

+11
-58
lines changed

doc/devel/documenting_mpl.rst

Lines changed: 9 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -297,17 +297,12 @@ packages as static images::
297297

298298
as rendered on the page: :ref:`thirdparty-index`.
299299

300-
Files can be included verbatim. For instance the ``matplotlibrc`` file
301-
is important for customizing Matplotlib, and is included verbatim in the
302-
tutorial in :doc:`/tutorials/introductory/customizing`::
300+
Files can be included verbatim. For instance the ``LICENSE`` file is included
301+
at :ref:`license-agreement` using ::
303302

304-
.. literalinclude:: ../../_static/matplotlibrc
303+
.. literalinclude:: ../../LICENSE/LICENSE
305304

306-
This is rendered at the bottom of :doc:`/tutorials/introductory/customizing`.
307-
Note that this is in a tutorial; see :ref:`writing-examples-and-tutorials`
308-
below.
309-
310-
The examples directory is also copied to :file:`doc/gallery` by sphinx-gallery,
305+
The examples directory is copied to :file:`doc/gallery` by sphinx-gallery,
311306
so plots from the examples directory can be included using
312307

313308
.. code-block:: rst
@@ -585,7 +580,7 @@ Setters and getters
585580
-------------------
586581

587582
Artist properties are implemented using setter and getter methods (because
588-
Matplotlib predates the introductions of the `property` decorator in Python).
583+
Matplotlib predates the Python `property` decorator).
589584
By convention, these setters and getters are named ``set_PROPERTYNAME`` and
590585
``get_PROPERTYNAME``; the list of properties thusly defined on an artist and
591586
their values can be listed by the `~.pyplot.setp` and `~.pyplot.getp` functions.
@@ -748,7 +743,7 @@ Adding figures
748743
--------------
749744

750745
As above (see :ref:`rst-figures-and-includes`), figures in the examples gallery
751-
can be referenced with a ``:plot:`` directive pointing to the python script
746+
can be referenced with a ``.. plot::`` directive pointing to the python script
752747
that created the figure. For instance the `~.Axes.legend` docstring references
753748
the file :file:`examples/text_labels_and_annotations/legend.py`:
754749

@@ -963,18 +958,10 @@ google docs to the mplgithub account.
963958
Generating inheritance diagrams
964959
-------------------------------
965960

966-
Class inheritance diagrams can be generated with the
967-
``inheritance-diagram`` directive. To use it, provide the
968-
directive with a number of class or module names (separated by
969-
whitespace). If a module name is provided, all classes in that module
970-
will be used. All of the ancestors of these classes will be included
971-
in the inheritance diagram.
961+
Class inheritance diagrams can be generated with the Sphinx
962+
`inheritance-diagram`_ directive.
972963

973-
A single option is available: *parts* controls how many of parts in
974-
the path to the class are shown. For example, if *parts* == 1, the
975-
class ``matplotlib.patches.Patch`` is shown as ``Patch``. If *parts*
976-
== 2, it is shown as ``patches.Patch``. If *parts* == 0, the full
977-
path is shown.
964+
.. _inheritance-diagram: https://www.sphinx-doc.org/en/master/usage/extensions/inheritance.html
978965

979966
Example:
980967

@@ -986,42 +973,6 @@ Example:
986973
.. inheritance-diagram:: matplotlib.patches matplotlib.lines matplotlib.text
987974
:parts: 2
988975

989-
.. _emacs-helpers:
990-
991-
Emacs helpers
992-
-------------
993-
994-
There is an emacs mode `rst.el
995-
<http://docutils.sourceforge.net/tools/editors/emacs/rst.el>`_ which
996-
automates many important ReST tasks like building and updating
997-
table-of-contents, and promoting or demoting section headings. Here
998-
is the basic ``.emacs`` configuration:
999-
1000-
.. code-block:: lisp
1001-
1002-
(require 'rst)
1003-
(setq auto-mode-alist
1004-
(append '(("\\.txt$" . rst-mode)
1005-
("\\.rst$" . rst-mode)
1006-
("\\.rest$" . rst-mode)) auto-mode-alist))
1007-
1008-
Some helpful functions::
1009-
1010-
C-c TAB - rst-toc-insert
1011-
1012-
Insert table of contents at point
1013-
1014-
C-c C-u - rst-toc-update
1015-
1016-
Update the table of contents at point
1017-
1018-
C-c C-l rst-shift-region-left
1019-
1020-
Shift region to the left
1021-
1022-
C-c C-r rst-shift-region-right
1023-
1024-
Shift region to the right
1025976

1026977
.. TODO: Add section about uploading docs
1027978

doc/users/license.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ The Matplotlib Development Team is the set of all contributors to the
3939
matplotlib project. A full list can be obtained from the git version
4040
control logs.
4141

42+
.. _license-agreement:
43+
4244
License agreement
4345
=================
4446

0 commit comments

Comments
 (0)