我正在尝试使用rbokeh
创建重叠的直方图。
以下是一个例子:
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)
我不确定color
选项是否会提供此功能。
感谢您的帮助。