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

Overlay violin doesn't cycle colors #3592

Closed
ahuang11 opened this issue Mar 31, 2019 · 4 comments

Comments

Projects
None yet
3 participants
@ahuang11
Copy link
Collaborator

commented Mar 31, 2019

groups = [chr(65+g) for g in np.random.randint(0, 3, 200)]
vio_df = pd.DataFrame({'groups': groups,
                       'value': np.random.randn(200),
                       'category': np.random.randint(0, 3, 200)})
vio_df.hvplot.violin('value', by='groups', groupby='category').overlay('category')

image

@jbednar

This comment has been minimized.

Copy link
Contributor

commented Mar 31, 2019

As written, this would go on https://github.com/pyviz/hvplot/ rather than this repo, as it's hvplot code, but maybe you know the same thing happens with regular HoloViews?

@ahuang11

This comment has been minimized.

Copy link
Collaborator Author

commented Apr 1, 2019

I assumed correctly :P

I believe it has to do with color not existing for Violin type?

violin.opts(color='red')

ValueError: Unexpected option 'color' for Violin type across all extensions. Similar options for current extension ('bokeh') are: ['bgcolor', 'box_color', 'colorbar'].
hv.Violin(vio_df.loc[vio_df['category'] == 0], 'groups', 'value') * hv.Violin(vio_df.loc[vio_df['category'] == 1], 'groups', 'value')

image

@philippjfr

This comment has been minimized.

Copy link
Contributor

commented Apr 1, 2019

I think it's to do with the fact that you hardcoded the value as lightgray 😄

@philippjfr philippjfr added this to the v1.12.2 milestone Apr 29, 2019

@philippjfr

This comment has been minimized.

Copy link
Contributor

commented Apr 29, 2019

Fixed in #3593

@philippjfr philippjfr closed this Apr 29, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.