Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

[Doc][Examples Gallery]: Side Navigation Section breaks on Animation …#25908

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
Mubin17 wants to merge1 commit intomatplotlib:mainfromMubin17:main

Conversation

Mubin17
Copy link
Contributor

@Mubin17Mubin17 commentedMay 18, 2023
edited
Loading

PR summary

This pull request is to address Issue#25836

The current behavior of the Animation Examples Gallery in the documentation is causing an inconsistent navigation experience. When clicking on any of the animation examples, the side navigation section displays links to the matplotlib API reference instead of the examples gallery. This PR removes the API reference links in the animation_api.rst which should fix Issue#25836.

This is what the side navigation looks like at the moment:
Screenshot 2023-05-17 at 11 22 32 PM

This is what it should look like:
Screenshot 2023-05-17 at 11 07 42 PM

@ksunden@codingtosh

PR checklist

codingtosh reacted with eyes emoji
Copy link

@github-actionsgithub-actionsbot left a comment

Choose a reason for hiding this comment

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

Thank you for opening your first PR into Matplotlib!

If you have not heard from us in a while, please feel free to ping@matplotlib/developers or anyone who has commented on the PR. Most of our reviewers are volunteers and sometimes things fall through the cracks.

You can also join uson gitter for real-time discussion.

For details on testing, writing docs, and our review process, please seethe developer guide

We strive to be a welcoming and open project. Please follow ourCode of Conduct.

@codingtosh
Copy link

Hi@Mubin17 Thank you for looking into this and welcome to the community. This is a good starting point, but we need the navigation section to appear like it does here:
expected behavior

We would like to show the Examples links, as opposed to the API links ( that reference the matplotlib.* library ). To understand this better, click on pyplot animation from the navigation section and then see what the navigation section continues to display. It should be the same as the above screenshot.

Whereas, if you were to click on some other example from the navigation section like Decay, it will load all the matplotlib api links in the navigation section, as opposed to retaining the examples links like it does in the pyplot animation as shown in your screenshot.

unexpected behavior

This is what we want to fix.

melissawm reacted with thumbs up emoji

@Mubin17
Copy link
ContributorAuthor

Mubin17 commentedMay 23, 2023
edited
Loading

Thank you@codingtosh for reviewing my PR. I believe that the problem lies with the examples mentioned/referenced in theanimation_api.rst file. They seem to be causing the website to break, while the examples not referenced their work just fine.

Here is a list of examples referenced in the animation_api.rst:

  • Decay
  • The Bayes update
  • The double pendulum problem
  • Animated histogram
  • Rain simulation
  • Animated 3D random walk
  • Animated line plot
  • Oscilloscope
  • MATPLOTLIB UNCHAINED
  • Animated image using a precomputed list of images
  • Frame grabbing
Screenshot 2023-05-22 at 7 06 44 PMScreenshot 2023-05-22 at 7 07 03 PM

And here is the list of examples not referenced in animation_api.rst

  • pyplot animation
  • Multiple axes animation
  • pasuing and resuming an animation
  • animated scatter saved as gif

Based on this observation, it appears that the examples mentioned in animation_api.rst are the root cause of the problem.

The solution that I am proposing involves removing the examples from the animation_api.rst file entirely. By doing so, we can effectively break the linkage between the Example links and API links, which should resolve the issue with the side navigation.

Additionally, this solution has the advantage of providing cleaner side navigation for the API references, as shown in the following example:https://user-images.githubusercontent.com/48038715/239146952-a8db6b1d-605a-4bbc-9ae0-f52ef564da45.png

If there's a specific need to reference Example links in animation_api.rst, we can brainstorm some alternative approaches to achieve that while keeping the navigation section intact. I'm open to discussion.

codingtosh reacted with thumbs up emoji

@melissawm
Copy link
Member

Hello@Mubin17 - thanks for looking into this!

I think my preference would be to remove the toctree but keep simple links to the examples. I'll show what I mean below:

timhoffm, Mubin17, and codingtosh reacted with thumbs up emoji

@@ -165,33 +165,9 @@ function::
A third method is to use closures to build up the required
artists and functions. A fourth method is to create a class.

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
Examples
~~~~~~~~
*:doc:`../gallery/animation/animate_decay`
*:doc:`../gallery/animation/bayes_update`
*:doc:`../gallery/animation/double_pendulum`
*:doc:`../gallery/animation/animated_histogram`
*:doc:`../gallery/animation/rain`
*:doc:`../gallery/animation/random_walk`
*:doc:`../gallery/animation/simple_anim`
*:doc:`../gallery/animation/strip_chart`
*:doc:`../gallery/animation/unchained`

../gallery/animation/simple_anim
../gallery/animation/strip_chart
../gallery/animation/unchained

``ArtistAnimation``
-------------------

Copy link
Member

Choose a reason for hiding this comment

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

Same thing here:

Suggested change
Examples
~~~~~~~~
*:doc:`../gallery/animation/dynamic_image`

@@ -270,14 +246,6 @@ strongly encouraged to use the `~.AbstractMovieWriter.saving` context manager::

to ensure that setup and cleanup are performed as necessary.

Copy link
Member

Choose a reason for hiding this comment

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

And here:

Suggested change
Examples
--------
*:doc:`../gallery/animation/frame_grabbing_sgskip`

Copy link
Member

@melissawmmelissawm left a comment

Choose a reason for hiding this comment

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

Looks great to me now, thanks@Mubin17 !

Mubin17 and codingtosh reacted with thumbs up emoji
@Mubin17
Copy link
ContributorAuthor

Mubin17 commentedMay 24, 2023
edited
Loading

Thanks for the help@melissawm. I've squashed all the commits into one for the sake of clean-up. Let me know if there are any additional changes you would like me to address. Thanks again!

@Mubin17Mubin17 requested a review frommelissawmMay 24, 2023 14:02
@melissawmmelissawm requested a review fromstory645May 24, 2023 14:02
@codingtosh
Copy link

Thanks for narrowing it down@Mubin17 , that was a sharp observation. Nicely done! For my reference, could you show me the screenshot of how the navigation section looks like when you reproduce the steps mentioned in#25908 after these changes?

@rcomer
Copy link
Member

There should have been an automatic check of the doc build and a link that allows us to view how the docs look with this change. I don’t know why that didn’t happen, but I’ll try closing and re-opening to see if that triggers it…

@rcomerrcomer closed thisMay 24, 2023
@rcomerrcomer reopened thisMay 24, 2023
@QuLogic
Copy link
Member

Maybe because it's onmain branch? Even tests aren't running.

melissawm reacted with eyes emoji

@Mubin17
Copy link
ContributorAuthor

@QuLogic I usually create a new branch for my pull requests, but it seems like I forgot to do it this time. My bad! Would creating a new PR on a separate branch help?

@QuLogic
Copy link
Member

It may help; I don't see anything obvious that would have been stopping it though.

@Mubin17
Copy link
ContributorAuthor

I have made a new PR [#25977] on a separate branch. I hope it helps

@QuLogic
Copy link
Member

OK, we'll see there.

@rcomer
Copy link
Member

Even tests aren't running.

We deliberately skip tests if all the changes are underdoc, so that’s expected. E.g.#25707.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@github-actionsgithub-actions[bot]github-actions[bot] left review comments

@melissawmmelissawmAwaiting requested review from melissawm

@story645story645Awaiting requested review from story645

Assignees
No one assigned
Projects
Status: Waiting for author
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

5 participants
@Mubin17@codingtosh@melissawm@rcomer@QuLogic

[8]ページ先頭

©2009-2025 Movatter.jp