Skip to content

Include puns colormaps#122

Merged
paulromano merged 4 commits into
openmc-dev:developfrom
SteSeg:include_puns_colormaps
Sep 13, 2023
Merged

Include puns colormaps#122
paulromano merged 4 commits into
openmc-dev:developfrom
SteSeg:include_puns_colormaps

Conversation

@SteSeg

@SteSeg SteSeg commented Sep 12, 2023

Copy link
Copy Markdown
Contributor

Hi! I noticed that the plotter does not allow for perceptually uniform sequential colormaps (e.g. viridis, cividis, plasma etc.). This PR includes them.
It was sufficient to substitute:

mcolormaps.datad

with:

mcolormaps._gen_cmap_registry()

in docks.py and plotgui.py files.

Picture1

@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.

I'm wary of relying on a function that is intended to be private (use of leading underscore). It looks like the same thing can be achieved with:

import matplotlib.pyplot as plt

plt.colormaps()

@SteSeg

SteSeg commented Sep 13, 2023

Copy link
Copy Markdown
Contributor Author

Right, I didn't realize that. I switched to those lines now. Thanks!

@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 @SteSeg!

@paulromano paulromano merged commit d7eb2fd into openmc-dev:develop Sep 13, 2023
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