From 68fe66d02c2ad78f69eed99b75b541bc228b38cc Mon Sep 17 00:00:00 2001 From: fredrik-1 Date: Thu, 9 Aug 2018 11:48:31 +0200 Subject: [PATCH] animation api changes --- doc/_templates/autosummary_inher.rst | 24 ++++++++++++++++++++++++ doc/api/animation_api.rst | 14 ++++++++++++-- 2 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 doc/_templates/autosummary_inher.rst diff --git a/doc/_templates/autosummary_inher.rst b/doc/_templates/autosummary_inher.rst new file mode 100644 index 000000000000..2c54bc6a0d02 --- /dev/null +++ b/doc/_templates/autosummary_inher.rst @@ -0,0 +1,24 @@ +{{ fullname | escape | underline}} + + +.. currentmodule:: {{ module }} + +.. auto{{ objtype }}:: {{ objname }} + :inherited-members: + :show-inheritance: + +{% if objtype in ['class', 'method', 'function'] %} +{% if objname in ['AxesGrid', 'Scalable', 'HostAxes', 'FloatingAxes', + 'ParasiteAxesAuxTrans', 'ParasiteAxes'] %} +.. Filter out the above aliases to other classes, as sphinx gallery + creates no example file for those (sphinx-gallery/sphinx-gallery#365) + +{% else %} +.. include:: {{module}}.{{objname}}.examples + +.. raw:: html + +
+ +{% endif %} +{% endif %} \ No newline at end of file diff --git a/doc/api/animation_api.rst b/doc/api/animation_api.rst index 8fd09486c064..02c4f3e64999 100644 --- a/doc/api/animation_api.rst +++ b/doc/api/animation_api.rst @@ -19,6 +19,7 @@ The easiest way to make a live animation in matplotlib is to use one of the .. autosummary:: :toctree: _as_gen + :template: autosummary_inher.rst :nosignatures: FuncAnimation @@ -163,6 +164,7 @@ all data in memory. .. autosummary:: :toctree: _as_gen + :template: autosummary_inher.rst :nosignatures: PillowWriter @@ -173,10 +175,11 @@ on all systems. .. autosummary:: :toctree: _as_gen + :template: autosummary_inher.rst :nosignatures: FFMpegWriter - ImageMagickFileWriter + ImageMagickWriter AVConvWriter The file-based writers save temporary files for each frame which are stitched @@ -185,10 +188,11 @@ debug. .. autosummary:: :toctree: _as_gen + :template: autosummary_inher.rst :nosignatures: FFMpegFileWriter - ImageMagickWriter + ImageMagickFileWriter AVConvFileWriter Fundamentally, a `MovieWriter` provides a way to grab sequential frames @@ -237,6 +241,7 @@ Animation Base Classes .. autosummary:: :toctree: _as_gen + :template: autosummary_inher.rst :nosignatures: Animation @@ -251,6 +256,7 @@ writer and the class to allow a string to be passed to .. autosummary:: :toctree: _as_gen + :template: autosummary_inher.rst :nosignatures: MovieWriterRegistry @@ -262,6 +268,7 @@ To reduce code duplication base classes .. autosummary:: :toctree: _as_gen + :template: autosummary_inher.rst :nosignatures: AbstractMovieWriter @@ -272,6 +279,7 @@ and mixins .. autosummary:: :toctree: _as_gen + :template: autosummary_inher.rst :nosignatures: AVConvBase @@ -287,6 +295,8 @@ Inheritance Diagrams .. inheritance-diagram:: matplotlib.animation.FuncAnimation matplotlib.animation.ArtistAnimation :private-bases: + :parts: 1 .. inheritance-diagram:: matplotlib.animation.AVConvFileWriter matplotlib.animation.AVConvWriter matplotlib.animation.FFMpegFileWriter matplotlib.animation.FFMpegWriter matplotlib.animation.ImageMagickFileWriter matplotlib.animation.ImageMagickWriter :private-bases: + :parts: 1