Skip to content

Improve bandwidth calculation for single-value violins #2779

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
etpinard opened this issue Jul 5, 2018 · 1 comment · Fixed by #3626
Closed

Improve bandwidth calculation for single-value violins #2779

etpinard opened this issue Jul 5, 2018 · 1 comment · Fixed by #3626
Labels
feature something new

Comments

@etpinard
Copy link
Contributor

etpinard commented Jul 5, 2018

From @alexcjohnson in #2775

But if we think this is a real use case we should use other violins on the same subplot to pick a bandwidth that's reasonable for the whole collection, like we do with histograms

@cpsievert
Copy link

This seems to cause a reasonable amount of confusion for folks working with real data, see

plotly/plotly.R#1476
plotly/plotly.R#1462

A minimal example

https://codepen.io/cpsievert/pen/xBdxvo

A vertical line at the singular value seems like the right way to handle this, it's also consistent with ggplot2:

screen shot 2019-03-07 at 4 27 10 pm

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

Successfully merging a pull request may close this issue.

2 participants