I am trying to create an overlaying histogram using rbokeh
.
An example can be found below:
library(rbokeh)
# Simple approach:
h1 <- figure(width = 600, height = 400) %>%
ly_hist(eruptions, data = faithful, breaks = 40, freq = T)
# Overlaying approach:
faithful$grouper <- sample(c("A","B"), 272, replace = T)
h2 <- figure(width = 600, height = 400) %>%
ly_hist(eruptions, data = faithful, breaks = 40, freq = T, color = grouper)
I am not sure whether the color
option would provide this functionality.
Thanks for your help.