-
Notifications
You must be signed in to change notification settings - Fork 280
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
BUG: modifications through matplotlib engine cannot be properly displayed #4774
Comments
hi @xshaokun , thanks for noticing ! I think what's happening is that the image (and most of the plot) is lazy-generated at some point ™️ between calls to MPL API and |
Thank @neutrinoceros for your reply!
It can produce an expected output in docs. However, if some plot window methods are called, it will break again. For example, methods like It seems like I was modifying different objects with different approaches. Does it make sense? |
Ah I missed what you said "ahead of MPL API". Now I got it how it works, thanks! @neutrinoceros |
I think what you described is an unfortunate but known limitation of yt's callback system: in general, using yt API to modify a plot has, by design, no immediate effect, and most computations and IO operations are delayed until the figure is rendered (in a REPL, or when |
I'm okay with the current design as soon as I know what's happening inside the box. I have to dive into the source code to figure out that |
Bug report
Bug summary
The Modifications through Matplotlib engine cannot be properly displayed.
Taking the following code for example, the expected modifications can only be shown by the containing matplotlib figure object like
fig.savefig("sloshing.png")
.Code for reproduction
adapted from docs (also broken there)
Actual outcome
Expected outcome
The changes of the x-axis tick labels
Version Information
The text was updated successfully, but these errors were encountered: