【发布时间】:2021-12-26 20:56:53
【问题描述】:
我有这个子图代码,我想通过自定义调色板设置颜色,但似乎没有任何颜色。
data.frame(x = sample(letters[1:3],30,replace = TRUE)) %>%
mutate(y = rnorm(30),
z = runif(30,10,20)) %>%
group_by(x) %>%
do(p=plot_ly(.,x = ~y, y=~z, type = "scatter", mode = "lines", line = list(color = "blue","red","green")))) %>%
subplot(nrows = 1,
shareX = FALSE,
shareY = TRUE,
margin = 0.0001)
【问题讨论】:
标签: r dplyr plotly data-visualization