plotly.R icon indicating copy to clipboard operation
plotly.R copied to clipboard

Boxplot outliers not removed.

Open mjdzr opened this issue 2 years ago • 1 comments

Hello and thanks a lot for the great package!

I want to delete boxplot outliers as they're duplicates of jitters (but I want to keep the jitters). I have tried to set outlier.[any option] to NA or 0 but still no luck.

Thank you!

library(pacman)
pacman::p_load(dplyr, ggplot2, plotly)


g <- ggplot(chickwts %>% dplyr::filter(feed == "sunflower"),
            aes(x = factor(feed), y = weight, fill = factor(feed))) + 
  geom_boxplot(outlier.shape = NA) + 
  geom_jitter(alpha = 0.5, height = 0)

plot(g)

image

ggplotly(g)

newplot (3)

I apologize if this has been discussed before. Feel free to delete...

mjdzr avatar Oct 18 '23 17:10 mjdzr

See this thread. I just posted a workaround function for this specific use case here. I think it is not yet solved in the current plotly version, but correct me if I am wrong.

LDSamson avatar Nov 09 '23 10:11 LDSamson