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

Overlayed Histograms share same color using Bokeh backend #918

Closed
mrksr opened this issue Oct 10, 2016 · 4 comments
Closed

Overlayed Histograms share same color using Bokeh backend #918

mrksr opened this issue Oct 10, 2016 · 4 comments

Comments

@mrksr
Copy link
Contributor

mrksr commented Oct 10, 2016

Overlaying two histograms using the Bokeh backend makes them share a color. This is not the case using the matplotlib-backend.

import numpy as np
import holoviews as hv
hv.notebook_extension("bokeh")

hvset = hv.Dataset({
    "Noise": np.random.normal(size=(1000,)),
    "More Noise": np.random.normal(loc=5, size=(1000,))
}, vdims=["Noise", "More Noise"])

hv.Overlay([
    hv.operation.histogram(hvset, dimension="Noise", adjoin=False, bin_range=(-5, 5), num_bins=40),
    hv.operation.histogram(hvset, dimension="More Noise", adjoin=False, bin_range=(0, 10), num_bins=40)
])

Overlayed Histograms

@jlstevens
Copy link
Contributor

Definitely a bug in the bokeh backend - whether it is just the style definitions or something else in the code. Thanks for reporting this!

@philippjfr
Copy link
Member

philippjfr commented Oct 11, 2016

Yes, this is just down to the default style definition. We should just make it match matplotlib, here's the current setting:

options.Histogram = Options('style', fill_color="#036564", line_color="#033649")

It should probably be this instead

options.Histogram = Options('style', line_color='black', fill_color=Cycle())

@jlstevens
Copy link
Contributor

I would be happy to see this style change committed straight to master - in my view, this is just fixing a bug.

@philippjfr
Copy link
Member

Now fixed, it required updating the bokeh tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants