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 · 5 comments
Closed

Overlay violin doesn't cycle colors #3592

ahuang11 opened this issue Mar 31, 2019 · 5 comments
Milestone

Comments

@ahuang11
Copy link
Collaborator

ahuang11 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
Copy link
Member

jbednar 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
Copy link
Collaborator Author

ahuang11 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
Copy link
Member

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
Copy link
Member

Fixed in #3593

Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants