【发布时间】:2016-08-29 17:43:26
【问题描述】:
我观察到plotly::plot_ly 的一个奇怪选择是在指定组着色时为误差条着色:
library("data.table")
library("plotly")
dat <- data.table(
low_diff = c(2, 3, 1)
, high_diff = c(3, 4, 1)
, point = c(10, 11, 9)
, type = LETTERS[1:3]
)
plot_ly(data = dat, y = type, x = point, mode = "markers", color = type,
error_x = list(type = "data", symmetric = FALSE,
array = high_diff, arrayminus = low_diff))
如何指定每个点的颜色应与其误差线相同?
【问题讨论】:
-
@Jota 发布答案?
-
@Jota 是的,绝对是,继续发帖,我会接受