-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Improve docs for to_jshtml() #21081
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
Improve docs for to_jshtml() #21081
Conversation
fps : int, optional | ||
Movie frame rate (per second). If not set, the frame rate from | ||
the animation's frame interval. | ||
embed_frames : bool, optional |
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.
From a quick look: If embed_frames
is True, the frame image data are inlined into the HTML. Otherwise they are written to separate files. Given that the data is read back in, I'm wondering if that option does make any sense (or works if set to false at all), becuase that would imply we still need access to the temporary directory. - This should probably be checked.
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 have bandwidth to check at the moment - if someone else wants to feel free, otherwise I'd advocate merging this as an improvement over what was there before.
"""Generate HTML representation of the animation""" | ||
""" | ||
Generate HTML representation of the animation. | ||
|
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.
One major usecase is to embed the animation into a jupyter notebook. Maybe that should be mentioned. See here for an example: https://github.com/timhoffm/euroscipy2019-using-matplotlib/blob/master/06_Animations.ipynb
Co-authored-by: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com>
Co-authored-by: Thomas A Caswell <tcaswell@gmail.com>
Merging as an improvement. |
…081-on-v3.5.x Backport PR #21081 on branch v3.5.x (Improve docs for to_jshtml())
Improve docs for to_jshtml()
Improve docs for to_jshtml()
PR Summary
I noticed that
to_jshtml()
didn't have a docstring, so have attempted to add one. I'm not too sure what 'embed_frames' does, so haven't added a description there.PR Checklist
pytest
passes).flake8
on changed files to check).flake8-docstrings
and runflake8 --docstring-convention=all
).doc/users/next_whats_new/
(follow instructions in README.rst there).doc/api/next_api_changes/
(follow instructions in README.rst there).