-
Notifications
You must be signed in to change notification settings - Fork 627
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
Some geoms always appear below others #866
Comments
This also affects other geoms. Is there a plan to address this issue? ###Sample gaussian distributions with 1, 2 and 3 modes.
df <- data.frame(
"Distribution" = c(rep("Unimodal", 500),
rep("Bimodal", 250),
rep("Trimodal", 600)),
"Value" = c(rnorm(500, 6, 1),
rnorm(200, 3, .7), rnorm(50, 7, 0.4),
rnorm(200, 2, 0.7), rnorm(300, 5.5, 0.4), rnorm(100, 8, 0.4))
)
library(ggplot)
library(ggforce)
p <- ggplot(df, aes(Distribution, Value, color=Distribution))+ geom_sina() + geom_boxplot( outlier.alpha=0)
p
p %>% ggplotly() Note also that the outliers are incorrectly printed (see the black dots) when they should be transparent and the legend is incorrect. Related: #1114 |
It seems the root issue here is some plotly.js traces are always drawn below other traces plotly/plotly.js#3748 These examples should automatically fix themselves if and when plotly.js respects the ordering of traces... |
Thanks for looking into this. Is the outlier printing issue something that would automatically be fixed, or it that different? |
That's a different problem that I have more control over. |
Rendering of violin plots with box plots (to provide median & stddev) is in wrong order when using ggplotly.
the ggplot (p) will render as expected with violin plots:
the ggplotly (q) will render with the box plot behind the violin plot (and larger than expected):
The text was updated successfully, but these errors were encountered: