Malta
November 2, 2016, 10:34am
1
hello,
working with plotly boxplot, I have trouble with whiskers size : it’s ok by default, see this example :
plot_ly(ggplot2::diamonds, y = ~price, color = ~cut, type = "box")
But if I want to suppress ouliers from the graph, I try to add boxpoints = FALSE like this :
plot_ly(ggplot2::diamonds, y = ~price, color = ~cut, type = "box",boxpoints=FALSE)
There is no more outliers, but my whiskers are now a lot longer ! How could I suppress ouliers whithout changing my whiskers’ size ?
bcd
November 4, 2016, 2:24am
2
Hey @Malta ,
a bit of a hacky solution may be to use marker color:
plot_ly(ggplot2::diamonds, y = ~price, color = ~cut, type = "box", marker=list(color = "transparent"))
although this is more of a hide than suppress .
Cheers,
Branden
Malta
November 4, 2016, 4:15am
3
yes I thought about that but it isn’t what I want : the main problem I have with outliers is that they change the graph scale so much I can’t even see my boxes; Masking outliers instead of suppressing them would only make thing weird.
It seems boxpoints=False changes the way the whiskers are calculated. See this . I have the same in plotly.py.