ggplotly does not preserve drawing order of elements defined by geom_rect
未关闭
还没有人认领这个 Issue。
- 主要语言
- R
- 星标
- 2.7k
- 派生
- 641
- PR 合并指标
- 30 天内没有已合并 PR
描述
When creating a ggplot with geom_rect the order in which the data is provided is honored. Once converted via ggplotly the drawing order changes and therefore geom_rect objects may e.g. no longer be visible. I would expect that the display between the original plot and the converted plot are the same.
pltData <- read.csv('exampleBug.csv')
plt <- ggplot(data = pltData) +
geom_rect(aes(ymax = yMax, ymin = yMin,
xmax = xMax, xmin = xMin,
fill = TornadoCase))
# gives the desired bebaviour
plt
# changes drawing order
ggplotly(plt)


贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
使用 exampleBug.csv 和提供的 R 代码重现该问题,从 ggplotly(plt) 转换入口点开始。比较原始的 geom_rect 显示与转换后的图,并追踪输入绘制顺序发生变化的位置。当转换后的图保留 geom_rect 的顺序并与原始显示一致时,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- r
- 领域
- data-visualization
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100