Skip to content

Auto pixel calc for universe plot - #2513

Merged
paulromano merged 6 commits into
openmc-dev:developfrom
shimwell:auto_pixel_calc_for_universe_plot
May 23, 2023
Merged

paulromano merged 6 commits into
openmc-dev:developfrom
shimwell:auto_pixel_calc_for_universe_plot

Conversation

@shimwell

@shimwell shimwell commented May 2, 2023

Copy link
Copy Markdown
Member

I've just been using the recently upgraded universe.plot and really liking all the automation.

I am thinking it could be even more convenient if we calculate the pixels in each basis direction for the user.

For long thin plots with a high aspect ratio I found myself manually calculating the aspect ratio and change the default pixels from (200, 200) to something that shared the pixels more evenly across the plot.

I thought it might be worth allowing the user to put in a single int and in this case treating this input as a total number of pixels sharing the pixels across the axis proportionally to their width. This allow easier scaling of resolution without the user having to know the aspect ratio of their geometry.

@paulromano paulromano left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

One small change and then this is good to go!

Comment thread openmc/universe.py Outdated
Comment thread openmc/universe.py Outdated
Comment thread openmc/universe.py

@paulromano paulromano left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks @shimwell!

@paulromano
paulromano merged commit 6c7f857 into openmc-dev:develop May 23, 2023
apingegno pushed a commit to apingegno/openmc that referenced this pull request May 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants