8000 Merge pull request #9046 from dstansby/class-methods · matplotlib/matplotlib@2ed56ab · GitHub
[go: up one dir, main page]

Skip to content

Commit 2ed56ab

Browse files
authored
Merge pull request #9046 from dstansby/class-methods
Document class methods
2 parents 21bbf8c + 500b658 commit 2ed56ab

File tree

7 files changed

+32
-23
lines changed

7 files changed

+32
-23
lines changed

doc/api/animation_api.rst

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
======================
44

55
.. automodule:: matplotlib.animation
6+
:no-members:
7+
:no-undoc-members:
68

79
.. contents:: Table of Contents
810
:depth: 1
@@ -30,16 +32,10 @@ to. If you do not hold a reference to the `Animation` object, it (and
3032
hence the timers), will be garbage collected which will stop the
3133
animation.
3234

33-
To save an animation to disk use
35+
To save an animation to disk use `Animation.save` or `Animation.to_html5_video`
3436

35-
.. autosummary::
36-
:toctree: _as_gen
37-
:nosignatures:
38-
39-
Animation.save
40-
Animation.to_html5_video
41-
42-
See :ref:`ani_writer_classes` below for details about what movie formats are supported.
37+
See :ref:`ani_writer_classes` below for details about what movie formats are
38+
supported.
4339

4440

4541
``FuncAnimation``
@@ -207,18 +203,6 @@ class `MovieWriter` implements 3 methods and a context manager. The
207203
only difference between the pipe-based and file-based writers is in the
208204
arguments to their respective ``setup`` methods.
209205

210-
211-
.. autosummary::
212-
:toctree: _as_gen
213-
:nosignatures:
214-
215-
MovieWriter.setup
216-
FileMovieWriter.setup
217-
MovieWriter.grab_frame
218-
MovieWriter.finish
219-
MovieWriter.saving
220-
221-
222206
The ``setup()`` method is used to prepare the writer (possibly opening
223207
a pipe), successive calls to ``grab_frame()`` capture a single frame
224208
at a time and ``finish()`` finalizes the movie and writes the output

doc/api/artist_api.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,16 @@
1111

1212

1313
.. automodule:: matplotlib.artist
14+
:no-members:
15+
:no-undoc-members:
1416

1517

1618
``Artist`` class
1719
================
1820

1921
.. autoclass:: Artist
22+
:no-members:
23+
:no-undoc-members:
2024

2125
Interactive
2226
-----------

doc/api/axes_api.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
.. currentmodule:: matplotlib.axes
55

66
.. autoclass:: Axes
7+
:no-members:
8+
:no-undoc-members:
79

810
.. contents:: Table of Contents
911
:depth: 2

doc/api/axis_api.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
:backlinks: entry
99

1010
.. automodule:: matplotlib.axis
11+
:no-members:
12+
:no-undoc-members:
1113

1214
Inheritance
1315
===========
@@ -20,9 +22,17 @@ Inheritance
2022
================
2123

2224
.. autoclass:: Axis
25+
:no-members:
26+
:no-undoc-members:
2327
.. autoclass:: XAxis
28+
:no-members:
29+
:no-undoc-members:
2430
.. autoclass:: YAxis
31+
:no-members:
32+
:no-undoc-members:
2533
.. autoclass:: Ticker
34+
:no-members:
35+
:no-undoc-members:
2636

2737

2838
.. autosummary::
@@ -235,8 +245,14 @@ not used together may de-couple your tick labels from your data.
235245
================
236246

237247
.. autoclass:: Tick
248+
:no-members:
249+
:no-undoc-members:
238250
.. autoclass:: XTick
251+
:no-members:
252+
:no-undoc-members:
239253
.. autoclass:: YTick
254+
:no-members:
255+
:no-undoc-members:
240256

241257

242258
.. autosummary::

doc/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ def _check_deps():
8989
autosummary_generate = True
9090

9191
autodoc_docstring_signature = True
92+
autodoc_default_flags = ['members', 'undoc-members']
9293

9394
intersphinx_mapping = {
9495
'python': ('https://docs.python.org/', None),

lib/matplotlib/figure.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -901,6 +901,8 @@ def add_axes(self, *args, **kwargs):
901901
902902
Examples
903903
--------
904+
A simple example::
905+
904906
rect = l,b,w,h
905907
fig.add_axes(rect)
906908
fig.add_axes(rect, frameon=False, facecolor='g')

lib/matplotlib/sphinxext/plot_directive.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,8 +344,8 @@ def split_code_at_show(text):
344344

345345

346346
def remove_coding(text):
347-
"""
348-
Remove the coding comment, which six.exec_ doesn't like.
347+
r"""
348+
Remove the coding comment, which six.exec\_ doesn't like.
349349
"""
350350
sub_re = re.compile("^#\s*-\*-\s*coding:\s*.*-\*-$", flags=re.MULTILINE)
351351
return sub_re.sub("", text)

0 commit comments

Comments
 (0)
0