-
Notifications
You must be signed in to change notification settings - Fork 526
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
Consolidate plotting capabilities in Model.plot #3282
Merged
pshriwise
merged 8 commits into
openmc-dev:develop
from
paulromano:plotting-improvements
Jan 31, 2025
Merged
Consolidate plotting capabilities in Model.plot #3282
pshriwise
merged 8 commits into
openmc-dev:develop
from
paulromano:plotting-improvements
Jan 31, 2025
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
shimwell
reviewed
Jan 29, 2025
Co-authored-by: Jonathan Shimwell <[email protected]>
pshriwise
reviewed
Jan 30, 2025
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.
Looks really nice @paulromano. Thanks for cleaning this up!
I'll allow a little bit of a cooldown -- merging tomorrow.
I did a little plotting with this and didn't see any errors so far. |
pshriwise
approved these changes
Jan 31, 2025
ahnaf-tahmid-chowdhury
pushed a commit
to ahnaf-tahmid-chowdhury/OpenMC
that referenced
this pull request
Feb 6, 2025
Co-authored-by: Jonathan Shimwell <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR is mostly a refactor of the following plot methods:
Model.plot
Geometry.plot
Universe.plot
Cell.plot
Region.plot
Right now, most of the actual plotting logic is in
Universe.plot
and the other methods just call that. With the changes here, the logic has been moved toModel.plot
, which will enable plotting to work for DAGMC geometries (which requiremodel.materials
). I've made a few other improvements and fixes, including:plane_tolerance
argument would not accept anint
due to a type check; this has been fixedoutline
argument now accepts either a bool or the string "only", which will only show the outline.contour_kwargs
argument that enables customization of the lines shown whenoutline
is True.@add_plot_params
decorator is used to list the parameters for the docstrings consistently, which means if we add or change an argument, you only have to update one string instead of every docstring for the classes above.Checklist
I have run clang-format (version 15) on any C++ source files (if applicable)