geom_GeomContourFilled() not implemented in plotly
未关闭
还没有人认领这个 Issue。
- 主要语言
- R
- 星标
- 2.7k
- 派生
- 641
- PR 合并指标
- 30 天内没有已合并 PR
描述
Hi,
Geom_contour_filled() is not supported by plotly.
Brief reproducable example below
library(ggplot2)
df <- tibble(x = c(0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5),
y = c(40, 40, 40, 40, 40, 40, 20, 20, 20, 20, 20, 20, 0, 0, 0, 0, 0, 0, -20, -20, -20, -20, -20, -20, -40, -40, -40, -40, -40, -40, -60, -60, -60, -60, -60, -60),
z = c(52.25, 49.38, 48.31, 46.17, 44, 43, 45.75, 44.22, 43.19, 41.16, 40.2, 39.6, 40.13, 39.21, 38.26,
36.39, 36.2, 36, 35, 34.5, 33.65, 32.81, 32.6, 31.97, 31.25, 30.35, 30.3, 30, 28.5, 27, 26.62, 26.2, 25.99, 24, 21.5, 17.23))
# This works well
p <- ggplot(df, aes(x = x, y = y)) +
geom_contour_filled(aes(z = z, fill = stat(level_mid))) +
scale_fill_viridis_b()
# However it doesn't work with ggplotly:
ggplotly(p)
Warning message:
In geom2trace.default(dots[[1L]][[1L]], dots[[2L]][[1L]], dots[[3L]][[1L]]) :
geom_GeomContourFilled() has yet to be implemented in plotly.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先运行可复现的 ggplot2 示例并调用 ggplotly(p),以观察 geom_GeomContourFilled() 警告。跟踪 ggplotly 如何处理等高线图层;当无需该警告即可支持填充等高线,并且示例通过 plotly 渲染时,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- r
- 领域
- data-visualization
- Issue 类型
- 功能
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100