ggplotly removes error bars
未关闭
还没有人认领这个 Issue。
bug
ggplotly
- 主要语言
- R
- 星标
- 2.7k
- 派生
- 641
- PR 合并指标
- 30 天内没有已合并 PR
描述
Hi,
Thanks for producing this great package. I think I've found a bug that occurs when trying to get ggplotly to produce error bars. The bug occurs when you try to set a colour aesthetic, at which point ggplotly removes the error bars. A reprex is below:
library(ggplot2)
library(plotly)
## create data set
data <- data.frame(
x = rep(paste0("G", 1:2), each = 2),
col = rep(paste0("T", 1:2), 2),
mn = 1:4,
LCI = 1:4 - 0.5,
UCI = 1:4 + 0.5
)
## ggplot version (has error bars)
p <- ggplot(data, aes(x = x, colour = col)) +
geom_point(aes(y = mn)) +
geom_errorbar(aes(ymin = LCI, ymax = UCI))
## plotly version (removes error bars)
ggplotly(p)
Many thanks,
TJ
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 ggplotly(p) 入口开始,运行 issue 中使用 colour aesthetic 和 geom_errorbar 图层的 reprex。当 colour 映射到 col 时,plotly 输出仍保留误差条,并与 ggplot 版本一致,即为完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- r
- 领域
- data-visualization
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 描述清楚
- 新手友好度
- 45/100