Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8e8291c

Browse filesBrowse files
committed
DOC: Fix more typos and minor errors
1 parent 1a6c61c commit 8e8291c
Copy full SHA for 8e8291c

File tree

Expand file treeCollapse file tree

2 files changed

+25
-25
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+25
-25
lines changed

‎doc/api/animation_api.rst

Copy file name to clipboardExpand all lines: doc/api/animation_api.rst
+6-7Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -200,12 +200,11 @@ slower, these writers can be easier to debug.
200200
AVConvFileWriter
201201

202202

203-
Fundamentally, a `MovieWriter` does is provide is a way to grab
204-
sequential frames from the same underlying `~matplotlib.figure.Figure`
205-
object. The base class `MovieWriter` implements 3 methods and a
206-
context manager. The only difference between the pipe-based and
207-
file-based writers in the arguments to their respective ``setup``
208-
methods.
203+
Fundamentally, a `MovieWriter` provides a way to grab sequential frames
204+
from the same underlying `~matplotlib.figure.Figure` object. The base
205+
class `MovieWriter` implements 3 methods and a context manager. The
206+
only difference between the pipe-based and file-based writers is in the
207+
arguments to their respective ``setup`` methods.
209208

210209

211210
.. autosummary::
@@ -225,7 +224,7 @@ at a time and ``finish()`` finalizes the movie and writes the output
225224
file to disk. For example ::
226225

227226
moviewriter = MovieWriter(...)
228-
moveiewriter.setup(fig=fig, 'my_movie.ext', dpi=100)
227+
moviewriter.setup(fig=fig, 'my_movie.ext', dpi=100)
229228
for j in range(n):
230229
update_figure(n)
231230
moviewriter.grab_frame()

‎lib/matplotlib/animation.py

Copy file name to clipboardExpand all lines: lib/matplotlib/animation.py
+19-18Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,7 @@ def adjusted_figsize(w, h, dpi, n):
6868

6969
# A registry for available MovieWriter classes
7070
class MovieWriterRegistry(object):
71-
'''Registry of available writer classes by human readable name
72-
'''
71+
'''Registry of available writer classes by human readable name.'''
7372
def __init__(self):
7473
self.avail = dict()
7574
self._registered = dict()
@@ -111,7 +110,7 @@ def list(self):
111110
return list(self.avail.keys())
112111

113112
def is_available(self, name):
114-
'''Check if given writer is available by name
113+
'''Check if given writer is available by name.
115114
116115
Parameters
117116
----------
@@ -277,6 +276,7 @@ def finish(self):
277276
def grab_frame(self, **savefig_kwargs):
278277
'''
279278
Grab the image information from the figure and save as a movie frame.
279+
280280
All keyword arguments in savefig_kwargs are passed on to the 'savefig'
281281
command that saves the figure.
282282
'''
@@ -344,7 +344,7 @@ def isAvailable(cls):
344344

345345

346346
class FileMovieWriter(MovieWriter):
347-
'''`MovieWriter` for writing to individual files and stitching at the end
347+
'''`MovieWriter` for writing to individual files and stitching at the end.
348348
349349
This must be sub-classed to be useful.
350350
'''
@@ -483,7 +483,7 @@ def cleanup(self):
483483
# Base class of ffmpeg information. Has the config keys and the common set
484484
# of arguments that controls the *output* side of things.
485485
class FFMpegBase(object):
486-
'''Mixin class for FFMpeg output
486+
'''Mixin class for FFMpeg output.
487487
488488
To be useful this must be multiply-inherited from with a
489489
`MovieWriterBase` sub-class.
@@ -537,7 +537,7 @@ def _args(self):
537537
# Combine FFMpeg options with temp file-based writing
538538
@writers.register('ffmpeg_file')
539539
class FFMpegFileWriter(FileMovieWriter, FFMpegBase):
540-
'''File-based ffmpeg writer
540+
'''File-based ffmpeg writer.
541541
542542
Frames are written to temporary files on disk and then stitched
543543
together at the end.
@@ -557,7 +557,7 @@ def _args(self):
557557
# Base class of avconv information. AVConv has identical arguments to
558558
# FFMpeg
559559
class AVConvBase(FFMpegBase):
560-
'''Mixin class for avconv output
560+
'''Mixin class for avconv output.
561561
562562
To be useful this must be multiply-inherited from with a
563563
`MovieWriterBase` sub-class.
@@ -580,7 +580,7 @@ class AVConvWriter(AVConvBase, FFMpegWriter):
580580
# Combine AVConv options with file-based writing
581581
@writers.register('avconv_file')
582582
class AVConvFileWriter(AVConvBase, FFMpegFileWriter):
583-
'''File-based avconv writer
583+
'''File-based avconv writer.
584584
585585
Frames are written to temporary files on disk and then stitched
586586
together at the end.
@@ -668,7 +668,7 @@ def _args(self):
668668

669669
# Base class for animated GIFs with convert utility
670670
class ImageMagickBase(object):
671-
'''Mixin class for ImageMagick output
671+
'''Mixin class for ImageMagick output.
672672
673673
To be useful this must be multiply-inherited from with a
674674
`MovieWriterBase` sub-class.
@@ -706,7 +706,7 @@ def _init_from_registry(cls):
706706
@classmethod
707707
def isAvailable(cls):
708708
'''
709-
Check to see if a ImageMagickWriter is actually available
709+
Check to see if a ImageMagickWriter is actually available.
710710
711711
Done by first checking the windows registry (if applicable) and then
712712
running the commandline tool.
@@ -725,7 +725,7 @@ def isAvailable(cls):
725725
# former.
726726
@writers.register('imagemagick')
727727
class ImageMagickWriter(ImageMagickBase, MovieWriter):
728-
'''Pipe-based animated gif
728+
'''Pipe-based animated gif.
729729
730730
Frames are streamed directly to ImageMagick via a pipe and written
731731
in a single pass.
@@ -745,7 +745,7 @@ def _args(self):
745745
# former.
746746
@writers.register('imagemagick_file')
747747
class ImageMagickFileWriter(ImageMagickBase, FileMovieWriter):
748-
'''File-based animated gif writer
748+
'''File-based animated gif writer.
749749
750750
Frames are written to temporary files on disk and then stitched
751751
together at the end.
@@ -873,7 +873,7 @@ class to use, such as 'ffmpeg' or 'mencoder'. If `None`,
873873
default to ``rcParams['animation.codec']``
874874
875875
bitrate : number, optional
876-
Specifies the amount of bits used per second in the
876+
Specifies the number of bits used per second in the
877877
compressed movie, in kilobits per second. A higher number
878878
means a higher quality movie, but at the cost of increased
879879
file size. If `None`, defaults to
@@ -1184,7 +1184,7 @@ def _repr_html_(self):
11841184

11851185

11861186
class TimedAnimation(Animation):
1187-
''':class:`Animation` subclass for time-based animation
1187+
''':class:`Animation` subclass for time-based animation.
11881188
11891189
A new frame is drawn every *interval* milliseconds.
11901190
@@ -1199,7 +1199,7 @@ class TimedAnimation(Animation):
11991199
12001200
repeat_delay : number, optional
12011201
If the animation in repeated, adds a delay in milliseconds
1202-
before repeating the animation. Defaults to None
1202+
before repeating the animation. Defaults to `None`
12031203
12041204
repeat : bool, optional
12051205
Controls whether the animation should repeat when the sequence
@@ -1284,7 +1284,7 @@ class ArtistAnimation(TimedAnimation):
12841284
be disabled for other frames.
12851285
12861286
interval : number, optional
1287-
Delay between frames in miliseconds. Defaults to 200.
1287+
Delay between frames in milliseconds. Defaults to 200.
12881288
12891289
repeat_delay : number, optional
12901290
If the animation in repeated, adds a delay in milliseconds
@@ -1346,7 +1346,8 @@ def _draw_frame(self, artists):
13461346

13471347

13481348
class FuncAnimation(TimedAnimation):
1349-
'''Makes an animation by repeatedly calling a function ``func``
1349+
'''
1350+
Makes an animation by repeatedly calling a function ``func``.
13501351
13511352
13521353
Parameters
@@ -1410,7 +1411,7 @@ def init_func() -> iterable_of_artists:
14101411
14111412
repeat : bool, optional
14121413
Controls whether the animation should repeat when the sequence
1413-
of frames is completed. Defaults to `True`
1414+
of frames is completed. Defaults to `True`.
14141415
14151416
blit : bool, optional
14161417
Controls whether blitting is used to optimize drawing. Defaults

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.