@@ -405,7 +405,7 @@ Write API documentation
405405The API reference documentation describes the library interfaces, e.g. inputs, outputs,
406406and expected behavior. Most of the API documentation is written in docstrings. These are
407407comment blocks in source code that explain how the code works. All new or edited
408- ocstrings should conform to the `numpydoc docstring guide `_. Much of the ReST _ syntax
408+ docstrings should conform to the `numpydoc docstring guide `_. Much of the ReST _ syntax
409409discussed above (:ref: `writing-rest-pages `) can be used for links and references.
410410
411411.. note ::
@@ -869,6 +869,26 @@ Plots can also be directly placed inside docstrings. Details are in
869869 An advantage of this style over referencing an example script is that the
870870code will also appear in interactive docstrings.
871871
872+ .. _inheritance-diagrams :
873+
874+ Generate inheritance diagrams
875+ -----------------------------
876+
877+ Class inheritance diagrams can be generated with the Sphinx
878+ `inheritance-diagram `_ directive.
879+
880+ .. _inheritance-diagram : https://www.sphinx-doc.org/en/master/usage/extensions/inheritance.html
881+
882+ Example:
883+
884+ .. code-block :: rst
885+
886+ .. inheritance-diagram:: matplotlib.patches matplotlib.lines matplotlib.text
887+ :parts: 2
888+
889+ .. inheritance-diagram :: matplotlib.patches matplotlib.lines matplotlib.text
890+ :parts: 2
891+
872892.. _writing-examples-and-tutorials :
873893
874894Write examples and tutorials
@@ -1154,28 +1174,6 @@ Use the full path for this directive, relative to the doc root at
11541174found by users at ``http://matplotlib.org/stable/old_topic/old_info2 ``.
11551175For clarity, do not use relative links.
11561176
1157-
1158- .. _inheritance-diagrams :
1159-
1160- Generate inheritance diagrams
1161- -----------------------------
1162-
1163- Class inheritance diagrams can be generated with the Sphinx
1164- `inheritance-diagram `_ directive.
1165-
1166- .. _inheritance-diagram : https://www.sphinx-doc.org/en/master/usage/extensions/inheritance.html
1167-
1168- Example:
1169-
1170- .. code-block :: rst
1171-
1172- .. inheritance-diagram:: matplotlib.patches matplotlib.lines matplotlib.text
1173- :parts: 2
1174-
1175- .. inheritance-diagram :: matplotlib.patches matplotlib.lines matplotlib.text
1176- :parts: 2
1177-
1178-
11791177Navbar and style
11801178----------------
11811179
0 commit comments