Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7c98a98

Browse files
committed
MNT: Re-arrange docs to avoid repeating save verbiage.
1 parent 5e5999f commit 7c98a98

1 file changed

Lines changed: 23 additions & 26 deletions

File tree

lib/matplotlib/animation.py

Lines changed: 23 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -686,48 +686,45 @@ def save(self, filename, writer=None, fps=None, dpi=None, codec=None,
686686
If nothing is passed, the value of the rcparam `animation.writer` is
687687
used.
688688
689-
*fps* is the frames per second in the movie. Defaults to None,
690-
which will use the animation's specified interval to set the frames
691-
per second. This argument is only valid if *writer* is not a
692-
:class:`MovieWriter` instance.
693-
694689
*dpi* controls the dots per inch for the movie frames. This combined
695690
with the figure's size in inches controls the size of the movie.
696691
692+
*savefig_kwargs* is a dictionary containing keyword arguments to be
693+
passed on to the 'savefig' command which is called repeatedly to save
694+
the individual frames. This can be used to set tight bounding boxes,
695+
for example.
696+
697+
*extra_anim* is a list of additional `Animation` objects that should
698+
be included in the saved movie file. These need to be from the same
699+
`matplotlib.Figure` instance. Also, animation frames will just be
700+
simply combined, so there should be a 1:1 correspondence between
701+
the frames from the different animations.
702+
703+
These remaining arguments are used to construct a :class:`MovieWriter`
704+
instance when necessary and are only considered valid if *writer* is
705+
not a :class:`MovieWriter` instance.
706+
707+
*fps* is the frames per second in the movie. Defaults to None,
708+
which will use the animation's specified interval to set the frames
709+
per second.
710+
697711
*codec* is the video codec to be used. Not all codecs are supported
698712
by a given :class:`MovieWriter`. If none is given, this defaults to the
699-
value specified by the rcparam `animation.codec`. This argument is only
700-
valid if *writer* is not a :class:`MovieWriter` instance.
713+
value specified by the rcparam `animation.codec`.
701714
702715
*bitrate* specifies the amount of bits used per second in the
703716
compressed movie, in kilobits per second. A higher number means a
704717
higher quality movie, but at the cost of increased file size. If no
705718
value is given, this defaults to the value given by the rcparam
706-
`animation.bitrate`. This argument is only valid if *writer* is not a
707-
:class:`MovieWriter` instance.
719+
`animation.bitrate`.
708720
709721
*extra_args* is a list of extra string arguments to be passed to the
710722
underlying movie utility. The default is None, which passes the
711-
additional arguments in the 'animation.extra_args' rcParam. This
712-
argument is only valid if *writer* is not a :class:`MovieWriter`
713-
instance.
723+
additional arguments in the 'animation.extra_args' rcParam.
714724
715725
*metadata* is a dictionary of keys and values for metadata to include
716726
in the output file. Some keys that may be of use include:
717-
title, artist, genre, subject, copyright, srcform, comment. This
718-
argument is only valid if *writer* is not a :class:`MovieWriter`
719-
instance.
720-
721-
*extra_anim* is a list of additional `Animation` objects that should
722-
be included in the saved movie file. These need to be from the same
723-
`matplotlib.Figure` instance. Also, animation frames will just be
724-
simply combined, so there should be a 1:1 correspondence between
725-
the frames from the different animations.
726-
727-
*savefig_kwargs* is a dictionary containing keyword arguments to be
728-
passed on to the 'savefig' command which is called repeatedly to save
729-
the individual frames. This can be used to set tight bounding boxes,
730-
for example.
727+
title, artist, genre, subject, copyright, srcform, comment.
731728
'''
732729
# If the writer is None, use the rc param to find the name of the one
733730
# to use

0 commit comments

Comments
 (0)