-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Cleanup animation docs. #16218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cleanup animation docs. #16218
Conversation
lib/matplotlib/animation.py
Outdated
fig : `~matplotlib.figure.Figure` | ||
The figure object that is used to get draw, resize, and any | ||
other needed events. | ||
fig : `~.Figure` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is our current policy to use fully qualified names for argument types, see https://matplotlib.org/devdocs/devel/documenting_mpl.html#referencing-types.
(multiple occurrences throught the PR)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't agree with that policy, but let's put that discussion to another time. Reverted.
lib/matplotlib/animation.py
Outdated
other needed events. | ||
interval : int, default: 200 | ||
Delay between frames in milliseconds. | ||
repeat_delay : int, default: None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
repeat_delay : int, default: None | |
repeat_delay : int, default: 0 |
That's what it semantically does. AFAICS we could even use 0 as the actual default value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agreed.
lib/matplotlib/animation.py
Outdated
other needed events. | ||
interval : int, default: 200 | ||
Delay between frames in milliseconds. | ||
repeat_delay : int, default: None | ||
If the animation in repeated, adds a delay in milliseconds |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the animation in repeated, adds a delay in milliseconds | |
If the animation is repeated, adds a delay in milliseconds |
But while we're at it, could be written as
The delay between subsequent runs of the animation, if it is repeated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agreed (modulo wording)
lib/matplotlib/animation.py
Outdated
the corresponding frame. Other artists are made invisible. | ||
interval : int, default: 200 | ||
Delay between frames in milliseconds. | ||
repeat_delay : int, default: None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See repeat_delay
comments above.
lib/matplotlib/animation.py
Outdated
repeat_delay : number, optional | ||
If the animation in repeated, adds a delay in milliseconds | ||
before repeating the animation. Defaults to *None*. | ||
repeat_delay : int, default: None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See repeat_delay
comments above.
12bcd51
to
6309dbb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
LGTM
lib/matplotlib/animation.py
Outdated
Controls whether blitting is used to optimize drawing. Defaults | ||
to ``False``. | ||
|
||
The figure object that is used to get draw, resize, and any |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick. That sentence is awkward. How about:
The figure object used to get needed events, such as draw or resize.
(I'm still unhappy about the word get
)
lib/matplotlib/animation.py
Outdated
The figure object that is used to get draw, resize, and any | ||
other needed events. | ||
|
||
The figure object that is used to get draw, resize, and any |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
lib/matplotlib/animation.py
Outdated
@@ -1550,23 +1535,23 @@ class FuncAnimation(TimedAnimation): | |||
Parameters | |||
---------- | |||
fig : `~matplotlib.figure.Figure` | |||
The figure object that is used to get draw, resize, and any | |||
other needed events. | |||
The figure object that is used to get draw, resize, and any |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
lib/matplotlib/animation.py
Outdated
Controls whether frame data is cached. Defaults to *True*. | ||
Disabling cache might be helpful when frames contain large objects. | ||
cache_frame_data : bool, default: True | ||
Controls whether frame data is cached. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick as well. You removed Controls
for the blit argument. It would make sense to remove it here as well.
Agreed with all. Additionally also slightly reworded AbstractMovieWriter.setup and inherited MovieWriter.setup from it. |
Thanks @anntzer ! |
PR Summary
PR Checklist