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
Closed

Overlay violin doesn't cycle colors #3592

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

Comments

@ahuang11
Copy link
Collaborator

@ahuang11 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 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?

Loading

@ahuang11
Copy link
Collaborator Author

@ahuang11 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

Loading

@philippjfr
Copy link
Member

@philippjfr philippjfr commented Apr 1, 2019

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

Loading

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

@philippjfr philippjfr commented Apr 29, 2019

Fixed in #3593

Loading

@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
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants