Skip to content

Histogram colorscales #1495

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
fparga opened this issue Mar 17, 2017 · 2 comments · Fixed by #1500
Closed

Histogram colorscales #1495

fparga opened this issue Mar 17, 2017 · 2 comments · Fixed by #1500
Assignees
Labels
bug something broken

Comments

@fparga
Copy link

fparga commented Mar 17, 2017

Hello,
I'm trying to make an histogram with a colorscale, I found the following example online, but it seems broken.

https://plot.ly/~etpinard/7146/histogram-with-colorscale/#plot

Is it still the right way to do this?

@alexcjohnson
Copy link
Collaborator

Oh weird. @Ni-Hil can you do the binning manually and make this with a bar trace? That behavior is known to work.

@etpinard I wasn't aware that we ever supported this usage but I guess you did if you made that plot! I'm kind of in favor of not allowing it though. Since you need to know the bins already in order to specify colors (and therefore you can't change the bins afterward without also recalculating the color array) seems to me the main advantage of using a histogram instead of a bar trace is lost and outweighed by the pitfalls of potential bin/color mismatches.

@etpinard
Copy link
Contributor

This is broken since 1.21.3. I suspect #1257 and/or #1260.

Here's a working version with 1.21.2: http://codepen.io/etpinard/pen/MpQpmx

I agree with @alexcjohnson colorscales on histograms are ill-defined. But a regression is a regression and we should fix this.

@etpinard etpinard added the bug something broken label Mar 20, 2017
@etpinard etpinard self-assigned this Mar 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants