-
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
Export to mpl figure #2790
Export to mpl figure #2790
Conversation
to a matplotlib grid recover from a deleted branch.
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.
Apart from the stylistic issues caught by travis this still looks good to me ! thanks for reissuing this !
I think I fixed all the style issues now. |
ah, sorry this didn't work ! make sure you have the latest versions for black and isort, older ones may produce different results that won't pass the CI check ! edit: I was looking at the previous jobs apparently, sorry ! |
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.
This is excellent, and think this is a really nice tool for our users! Thank you so much for the reissue @zingale !!!!
I think it would be nice if you could add an existing example of using this (and maybe also doing some subsequent operations on the matplotlib object) in the narrative docs. The set you linked to seems like a good place. Would you mind adding another section there with this function being used too?
@munkm I could either rewrite the above linked cookbook example to use this, or add an example right afterwards that shows how to do that more easily -- what do you think? |
I think adding an example right afterwards to show how to do it more easily would be great -- that way users can see two methods to get the same result! |
done! a new cookbook script appears after the original now. |
You rock! And this feature rocks!!! 🤘 🎸 🚀 Thank you so much @zingale ! I'll merge once the tests pass. 🙂 |
PR Summary
This reissues #2497
A common operation is to make a matplotlib figure and grid of axes to display slice plots or projection plots, e.g., as shown in this cookbook recipe:
https://yt-project.org/docs/dev/cookbook/complex_plots.html#multipanel-with-axes-labels
This adds a method to
PWViewerMPL
to automate a lot of that setup. E.g., you would now do that recipe as:PR Checklist
flake8 yt/
isort . --check --diff
black --check yt/