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

Skip to content

[Doc] Add Jupyter notebook animation example with phase display#31505

Open
Lankalapallikumar wants to merge 2 commits intomatplotlib:mainfrom
Lankalapallikumar:Lankalapallikumar-patch-1
Open

[Doc] Add Jupyter notebook animation example with phase display#31505
Lankalapallikumar wants to merge 2 commits intomatplotlib:mainfrom
Lankalapallikumar:Lankalapallikumar-patch-1

Conversation

@Lankalapallikumar
Copy link
Copy Markdown

@Lankalapallikumar Lankalapallikumar commented Apr 16, 2026

Description

This PR improves the animation documentation by adding a section explaining how to display animations in Jupyter notebooks.

It includes:

  • Using "HTML(ani.to_jshtml())" for rendering
  • Enabling inline display with "plt.rcParams['animation.html'] = 'html5'"
  • An example with dynamic title (frame and phase)

Closes #31474

AI Disclosure

This contribution was created with assistance from ChatGPT for guidance and structuring the documentation. The final changes were reviewed and modified by me.

This PR improves the animation documentation by adding an example for displaying animations in Jupyter notebooks.

- Added a new section demonstrating how to use HTML(ani.to_jshtml()) for inline display.
- Included a dynamic title update showing both frame number and phase value.

This helps users better understand how to work with animations in notebook environments.
@github-actions github-actions Bot added the Documentation: user guide files in galleries/users_explain or doc/users label Apr 16, 2026
Moved HTML import to the top of the file to fix E402 error.
Added required blank lines before function definition to fix E302.
@Lankalapallikumar
Copy link
Copy Markdown
Author

Hi, I have fixed the linting issues and updated the PR.
All checks are now passing. Kindly review the changes. Thank you!

@melissawm
Copy link
Copy Markdown
Member

Please fill out the PR template (the description of this PR) correctly, especially adding a link to the issue you are trying to solve and answering the AI disclosure section. Thanks

@melissawm melissawm moved this from Needs review to Waiting for author in First Time Contributors Apr 16, 2026
@Lankalapallikumar
Copy link
Copy Markdown
Author

Hi, I have updated the PR description to correctly link the issue and included the AI disclosure. Kindly review. Thank you!

@melissawm melissawm moved this from Waiting for author to Needs review in First Time Contributors Apr 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Documentation: user guide files in galleries/users_explain or doc/users

Projects

Status: Needs review

Development

Successfully merging this pull request may close these issues.

[Doc]: Improve documentation of animations in jupyter notebooks

2 participants