【发布时间】:2022-01-04 12:40:47
【问题描述】:
我正在尝试使用自定义值为 r-plotly 箱线图着色,但它仍保持默认的蓝色。
例如-见官方教程中的代码:https://plotly.com/r/box-plots/#box-plot-with-precomputed-quartiles。当我添加着色代码时,颜色没有任何反应:
fig <- plot_ly(y = list(1,2,3,4,5,6,7,8,9), type = "box", q1=list(1, 2, 3), median=list(4, 5, 6),
q3=list(7, 8, 9 ), lowerfence=list(-1, 0, 1),
upperfence=list(5, 6, 7), mean=list(2.2, 2.8, 3.2 ),
sd=list(0.2, 0.4, 0.6), notchspan=list(0.2, 0.4, 0.6),
color = list(1,1,2),
colors = list("red2", "grey"))
fig
我做错了什么?
【问题讨论】:
标签: r-plotly r plotly boxplot r-plotly