Skip to content

Conversation

@apcamargo
Copy link
Contributor

@apcamargo apcamargo commented Dec 15, 2025

This PR creates the ParaView namespace and adds four new color maps obtained from Kenneth Moreland's website:

fast

fast is a diverging color map, by Francesca Samsel, W. Alan Scott, and Kenneth Moreland. A paper describing the creation of this color map can be found in "A New Default Colormap for ParaView".

image

kindlmann

This is a modified version of the color map described by Kindlmann et al. to make it perceptually uniform.

image

blackbody

image

@codecov
Copy link

codecov bot commented Dec 15, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.55%. Comparing base (16e45c5) to head (272ba54).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #125      +/-   ##
==========================================
+ Coverage   95.54%   95.55%   +0.01%     
==========================================
  Files         167      168       +1     
  Lines        2176     2181       +5     
==========================================
+ Hits         2079     2084       +5     
  Misses         97       97              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@apcamargo
Copy link
Contributor Author

apcamargo commented Dec 15, 2025

@tlambert03 I also added the coolwarm color map to the ParaView namespace, since that is its original source rather than Matplotlib. The data was obtained from the original author: https://github.com/kennethmoreland-com/kennethmoreland-com.github.io/tree/main/content/color-advice/smooth-cool-warm

Do you think it would make sense to remove the coolwarm data from Matplotlib and have the Matplotlib namespace reference the ParaView data instead? I did not do this in my PR because the data are not identical, but they are sufficiently similar that I do not expect this change would cause issues.

Copy link
Member

@tlambert03 tlambert03 left a comment

Choose a reason for hiding this comment

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

Can you find any license information that we could add to this data? (if not, leaving it blank is indeed the correct approach)

also, it would be great if you could put your brief blurb about each colormap (explaining the intention/design principles) under the "info" key for the corresponding colormap (that way it will show up on the docs/website)

@tlambert03
Copy link
Member

Do you think it would make sense to remove the coolwarm data from Matplotlib and have the Matplotlib namespace reference the ParaView data instead? I did not do this in my PR because the data are not identical, but they are sufficiently similar that I do not expect this change would cause issues.

I'm a little torn on this one. maybe let's leave it duplicated for now.

"Kenneth Moreland"
],
"category": "diverging",
"data": "cmap.data.paraview:fast",
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"data": "cmap.data.paraview:fast",
"data": "cmap.data.paraview:coolwarm"

?

Copy link
Member

Choose a reason for hiding this comment

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

actually... after re-reading your comment in the original post, I think the value was right, but the key in the colormap is wrong (based on the authors here). Please fix one way or the other though

"Kenneth Moreland"
],
"category": "diverging",
"data": "cmap.data.paraview:coolwarm",
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"data": "cmap.data.paraview:coolwarm",
"data": "cmap.data.paraview:fast",

?

@apcamargo
Copy link
Contributor Author

@tlambert03 done!

@tlambert03
Copy link
Member

there's still an issue here. Note how in record.json colormaps['coolwarm']['data'] is "cmap.data.paraview:fast" and vice versa

@apcamargo
Copy link
Contributor Author

Should be fixed now

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