Would love to see geom_GeomBracket() to be implemented in plotly
还没有人认领这个 Issue。
- 主要语言
- R
- 星标
- 2.7k
- 派生
- 641
- PR 合并指标
- 30 天内没有已合并 PR
描述
Hello,
I am a big fan of plotly because of its interactive features and unlike any other normal static plots. I usually use ggplot to visualize my data and then use a ggplotly to make my plot into a plotly interactive plot, but for boxplot with p-value bracket , plotly does not show that feature. I would really appreciated if that feature could be added to plotly as well in the future.
df <- ToothGrowth
df$dose <- as.factor(df$dose)
head(df, 3)
stat.test <- df %>%
group_by(dose) %>%
t_test(len ~ supp) %>%
adjust_pvalue(method = "bonferroni") %>%
add_significance("p.adj")
stat.test
# Create a box plot
bxp <- ggboxplot(
df, x = "dose", y = "len",
color = "supp", palette = c("#00AFBB", "#E7B800")
)
# Add p-values onto the box plots
stat.test <- stat.test %>%
add_xy_position(x = "dose", dodge = 0.8)
bxp + stat_pvalue_manual(
stat.test, label = "p", tip.length = 0
)
#pvalue disappear
ggplotly(bxp + stat_pvalue_manual(
+ stat.test, label = "p", tip.length = 0
+ ))
Warning message:
In geom2trace.default(dots[[1L]][[1L]], dots[[2L]][[1L]], dots[[3L]][[1L]]) :
geom_GeomBracket() has yet to be implemented in plotly.
If you'd like to see this geom implemented,
Please open an issue with your example code at
https://github.com/ropensci/plotly/issues
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从示例中显示的 geom2trace.default 警告开始,检查 ggplotly 如何处理所提供的 geom_GeomBracket()。重现 ToothGrowth 示例,然后验证括号和 p 值是否出现在交互式绘图中,且不会出现未实现 geom 的警告。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- r
- 领域
- data-visualization
- Issue 类型
- 功能
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 25/100