From 500b658f2b0152621725c092585c3966ff359d1d Mon Sep 17 00:00:00 2001 From: David Stansby Date: Fri, 18 Aug 2017 09:41:42 +0100 Subject: [PATCH] Don't document class methods on axis/tick api page Add some more no-index Remove extra method listings Fix Figure example section Escape plot_directive docstring@ --- doc/api/animation_api.rst | 26 +++++----------------- doc/api/artist_api.rst | 4 ++++ doc/api/axes_api.rst | 2 ++ doc/api/axis_api.rst | 16 +++++++++++++ lib/matplotlib/figure.py | 2 ++ lib/matplotlib/sphinxext/plot_directive.py | 4 ++-- 6 files changed, 31 insertions(+), 23 deletions(-) diff --git a/doc/api/animation_api.rst b/doc/api/animation_api.rst index b36d4cc85f55..755a6b74e7a5 100644 --- a/doc/api/animation_api.rst +++ b/doc/api/animation_api.rst @@ -3,6 +3,8 @@ ====================== .. automodule:: matplotlib.animation + :no-members: + :no-undoc-members: .. contents:: Table of Contents :depth: 1 @@ -30,16 +32,10 @@ to. If you do not hold a reference to the `Animation` object, it (and hence the timers), will be garbage collected which will stop the animation. -To save an animation to disk use +To save an animation to disk use `Animation.save` or `Animation.to_html5_video` -.. autosummary:: - :toctree: _as_gen - :nosignatures: - - Animation.save - Animation.to_html5_video - -See :ref:`ani_writer_classes` below for details about what movie formats are supported. +See :ref:`ani_writer_classes` below for details about what movie formats are +supported. ``FuncAnimation`` @@ -206,18 +202,6 @@ class `MovieWriter` implements 3 methods and a context manager. The only difference between the pipe-based and file-based writers is in the arguments to their respective ``setup`` methods. - -.. autosummary:: - :toctree: _as_gen - :nosignatures: - - MovieWriter.setup - FileMovieWriter.setup - MovieWriter.grab_frame - MovieWriter.finish - MovieWriter.saving - - The ``setup()`` method is used to prepare the writer (possibly opening a pipe), successive calls to ``grab_frame()`` capture a single frame at a time and ``finish()`` finalizes the movie and writes the output diff --git a/doc/api/artist_api.rst b/doc/api/artist_api.rst index da1839b0636d..87078403879a 100644 --- a/doc/api/artist_api.rst +++ b/doc/api/artist_api.rst @@ -11,12 +11,16 @@ .. automodule:: matplotlib.artist + :no-members: + :no-undoc-members: ``Artist`` class ================ .. autoclass:: Artist + :no-members: + :no-undoc-members: Interactive ----------- diff --git a/doc/api/axes_api.rst b/doc/api/axes_api.rst index 4737c043da12..f602af3a9f02 100644 --- a/doc/api/axes_api.rst +++ b/doc/api/axes_api.rst @@ -4,6 +4,8 @@ .. currentmodule:: matplotlib.axes .. autoclass:: Axes + :no-members: + :no-undoc-members: .. contents:: Table of Contents :depth: 2 diff --git a/doc/api/axis_api.rst b/doc/api/axis_api.rst index 01dd873e495b..afea7afff682 100644 --- a/doc/api/axis_api.rst +++ b/doc/api/axis_api.rst @@ -8,6 +8,8 @@ :backlinks: entry .. automodule:: matplotlib.axis + :no-members: + :no-undoc-members: Inheritance =========== @@ -20,9 +22,17 @@ Inheritance ================ .. autoclass:: Axis + :no-members: + :no-undoc-members: .. autoclass:: XAxis + :no-members: + :no-undoc-members: .. autoclass:: YAxis + :no-members: + :no-undoc-members: .. autoclass:: Ticker + :no-members: + :no-undoc-members: .. autosummary:: @@ -235,8 +245,14 @@ not used together may de-couple your tick labels from your data. ================ .. autoclass:: Tick + :no-members: + :no-undoc-members: .. autoclass:: XTick + :no-members: + :no-undoc-members: .. autoclass:: YTick + :no-members: + :no-undoc-members: .. autosummary:: diff --git a/lib/matplotlib/figure.py b/lib/matplotlib/figure.py index 4c6b042be5a4..fdffa3444697 100644 --- a/lib/matplotlib/figure.py +++ b/lib/matplotlib/figure.py @@ -901,6 +901,8 @@ def add_axes(self, *args, **kwargs): Examples -------- + A simple example:: + rect = l,b,w,h fig.add_axes(rect) fig.add_axes(rect, frameon=False, facecolor='g') diff --git a/lib/matplotlib/sphinxext/plot_directive.py b/lib/matplotlib/sphinxext/plot_directive.py index 89e46b04fdd7..1e92f5a29814 100644 --- a/lib/matplotlib/sphinxext/plot_directive.py +++ b/lib/matplotlib/sphinxext/plot_directive.py @@ -344,8 +344,8 @@ def split_code_at_show(text): def remove_coding(text): - """ - Remove the coding comment, which six.exec_ doesn't like. + r""" + Remove the coding comment, which six.exec\_ doesn't like. """ sub_re = re.compile("^#\s*-\*-\s*coding:\s*.*-\*-$", flags=re.MULTILINE) return sub_re.sub("", text)