Here’s an example:
dd <- lattice::make.groups(
a = rnorm(100),
b = rnorm(100, mean = 2),
c = rnorm(100, mean = 5)
dd$jitwhich <- paste0(dd$which, “:”, runif(min = 0.2, max = 0.8, nrow(dd)))
ly_boxplot(data, which, data = dd) %>%
ly_points(jitwhich, data, data = dd, color = “black”)
In Bokeh, you can offset categorical values by appending a “:” followed by a number between 0 and 1. 0.5 is center. It would be nice to have a “catjitter" function - if you file an issue, this should be an easy addition.
On Oct 22, 2015, at 10:04 AM, jeremiah rounds [email protected] wrote:
Is it possible to do this in rbokeh (overlay observations on a boxplot)
figure() %>% ly_boxplot(x=as.character(iris$Species), y=iris$Sepal.Width) %>%
is easy, but then when I tried to think of a way to jitter the points I ran into conceptual problems. ly_boxplots forces a categorical x-axis and jittering is a numeric x-axis.
You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/f7f0805f-adf0-44ec-a466-406b4934158c%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.