Skip to content

Add 'nancolor' heatmap attribute #1170

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

Closed
wants to merge 1 commit into from
Closed

Add 'nancolor' heatmap attribute #1170

wants to merge 1 commit into from

Conversation

etpinard
Copy link
Contributor

resolves #975

... if we agree this is a good addition.

gifrecord_2016-11-18_164917

@alexcjohnson @cldougl @chriddyp @rreusser

@alexcjohnson
Copy link
Collaborator

I like it. One related thing people may want to do is set missing bricks to a certain data value - often 0 but I can imagine cases where you'd want to use other values. That way it automatically takes that value from the colorscale.

These two effects are a bit different - which you can see most clearly when you think about smoothed heatmaps or contour maps (which should also get this feature!) setting nan to a specific color should not attempt to interpolate it, or its color, to its neighbor, but setting nan to a specific value should interpolate. Also setting a nan value could extend the auto range of the color scale, depending on whether there's a nan in the data or not.

So we could attempt to specify these by the same attribute, which has the advantage that it's impossible for folks to specify both, and one less attribute to learn - something like nanfill=0 vs nanfill='red'... or to better distinguish their behaviors we could keep them separate, handle nancolor as you have it and add another like nanvalue, then we need to decide which takes precedence. I don't have a strong preference between these options, anyone?

@nzjrs
Copy link

nzjrs commented Jul 28, 2017

any reason why this got dropped?

@etpinard
Copy link
Contributor Author

any reason why this got dropped?

Not enough hours in a day.

@etpinard
Copy link
Contributor Author

Closing this thing. We're still planning on adding this feature, but this should happen in another PR.

Devs should refer back to #975 and keep in mind #2142 during future development.

@etpinard etpinard closed this Nov 17, 2017
@etpinard etpinard deleted the nancolor branch November 17, 2017 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature something new
Projects
None yet
Development

Successfully merging this pull request may close these issues.

histogram2d / heatmap with z: separate color for empty bins
3 participants