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

Skip to content

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

Merged
merged 1 commit into from
Jan 15, 2020
Merged

Cleanup animation docs. #16218

merged 1 commit into from
Jan 15, 2020

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Jan 14, 2020

PR Summary

PR Checklist

  • Has Pytest style unit tests
  • Code is Flake 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

fig : `~matplotlib.figure.Figure`
The figure object that is used to get draw, resize, and any
other needed events.
fig : `~.Figure`
Copy link
Member

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)

Copy link
Contributor Author

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.

other needed events.
interval : int, default: 200
Delay between frames in milliseconds.
repeat_delay : int, default: None
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agreed.

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agreed (modulo wording)

the corresponding frame. Other artists are made invisible.
interval : int, default: 200
Delay between frames in milliseconds.
repeat_delay : int, default: None
Copy link
Member

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.

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
Copy link
Member

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.

Copy link
Member

@NelleV NelleV left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍
LGTM

Controls whether blitting is used to optimize drawing. Defaults
to ``False``.

The figure object that is used to get draw, resize, and any
Copy link
Member

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)

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

@@ -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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

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.
Copy link
Member

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.

@anntzer
Copy link
Contributor Author

anntzer commented Jan 15, 2020

Agreed with all. Additionally also slightly reworded AbstractMovieWriter.setup and inherited MovieWriter.setup from it.

@NelleV NelleV merged commit 6ee361b into matplotlib:master Jan 15, 2020
@NelleV
Copy link
Member

NelleV commented Jan 15, 2020

Thanks @anntzer !

@anntzer anntzer deleted the adoc branch January 15, 2020 12:42
@QuLogic QuLogic added this to the v3.3.0 milestone Feb 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants