Skip to content

Commit 5b1169f

Browse files
committed
Document plot directive usage
1 parent 04c9d99 commit 5b1169f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

doc/format.rst

+7
Original file line numberDiff line numberDiff line change
@@ -443,6 +443,13 @@ The sections of a function's docstring are:
443443
``import matplotlib.pyplot as plt``. All other imports, including the
444444
demonstrated function, must be explicit.
445445

446+
When matplotlib is imported in the example, the Example code will be
447+
wrapped in `matplotlib's Sphinx `plot` directive
448+
<http://matplotlib.org/sampledoc/extensions.html>`_. When matplotlib is
449+
not explicitly imported, `.. plot::` can be used directly if
450+
`matplotlib.sphinxext.plot_directive` is loaded as a Sphinx extension in
451+
``conf.py``.
452+
446453

447454
Documenting classes
448455
-------------------

0 commit comments

Comments
 (0)