Empty objects in subplot
未关闭
还没有人认领这个 Issue。
- 主要语言
- R
- 星标
- 2.7k
- 派生
- 641
- PR 合并指标
- 30 天内没有已合并 PR
描述
An error arises when mix an empty object with ggplot-derived plotly in subplot
library(plotly); library(ggplot2)
df <- data.frame(dose=c("D0.5", "D1", "D2"), len=c(4.2, 10, 29.5))
p<-ggplot(data=df, aes(x=dose, y=len)) +geom_bar(stat="identity")
ply <- ggplotly(p)
# This gives an error.
subplot(ply, ply, ggplotly(ggplot()), nrows=1, shareX=F, shareY=F, margin=0, widths=c(0.3, 0.3, 0.3))
# This gives a warning.
subplot(ply, ply, plotly_empty(type = "scatter"), nrows=1, shareX=F, shareY=F, margin=0, widths=c(0.3, 0.3, 0.3))
What are the possible solutions? Thanks!
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先运行使用 ggplotly()、subplot() 和 plotly_empty() 的可复现 R 示例,以观察错误和警告。检查 subplot 对空绘图对象的处理,并为这两种情况定义回归测试覆盖;完成标准是空对象可以在不产生错误或警告的情况下组合。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- r
- 领域
- data-visualization
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 35/100