Uncorrect behavior of error_y with grouped Y values
未关闭
还没有人认领这个 Issue。
- 主要语言
- R
- 星标
- 2.7k
- 派生
- 641
- PR 合并指标
- 30 天内没有已合并 PR
描述
I've got some problems plotting an std deviation of some value Y grouped by a factor G,here's the df
df<-data.frame("X"=c(1:20),"Y"=c(1:20),"SD"=c(1:20),"G"=c(rep("A",3),rep("B",5),rep("C",4),rep("D",5),rep("A",3)))
If I plot the value and the sd without grouping them everything is OK:
p3<-plot_ly(df,
x=~X,
y=~Y,
type="scatter",
mode="markers",
marker=list(symbol="x"),
error_y =list(
array=~SD,
thickness=1
)
)
p3
This yields the following plot:

But when i try to plot Y+SD grouped by G the SD appears not in the correct order. See the resulting plot below:
p3<-plot_ly(df,
x=~X,
y=~Y,
color=~G,
type="scatter",
mode="markers",
marker=list(symbol="x"),
error_y =list(array=~SD,
thickness=1
)
)
p3

贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先,使用示例数据框运行提供的 R 示例,并比较分组图和未分组图。跟踪 color=~G 时 plot_ly 如何处理 error_y;当每个误差条都与其对应分组观测的 SD 值匹配时,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- r
- 领域
- data-visualization
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100