Skip to content
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

silx.gui.colors: Added Colormap.get|setNaNColor to change color used for NaN #3143

Merged
merged 9 commits into from
Jul 1, 2020

Conversation

t20100
Copy link
Member

@t20100 t20100 commented Jun 30, 2020

NaN values in images were displayed differentely with the matplotlib backend (transparent) and the opengl one (as lowest bound of the colormap).
This PR fixes this difference by making the OpenGL backend behave as the matplotlib one.
Furthermore, it adds Colormap.get|setNaNColor methods to allow to change the color used for NaN and it supports it in both PlotWidget and plot3d.

@t20100 t20100 added this to the 0.14 milestone Jun 30, 2020
@vallsv
Copy link
Contributor

vallsv commented Jul 1, 2020

Looks good to me, except the NaN color should be saved in saveState/restoreState. I can do it if you like.

@t20100
Copy link
Member Author

t20100 commented Jul 1, 2020

I updated the store/restore methods.

@vallsv
Copy link
Contributor

vallsv commented Jul 1, 2020

Well done. Very nice to check the v2 binary.

@vallsv vallsv merged commit 3f4d264 into silx-kit:master Jul 1, 2020
@t20100 t20100 deleted the cmap-nan-color branch July 2, 2020 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants