Integration with geom_phylopic()
还没有人认领这个 Issue。
- 主要语言
- R
- 星标
- 2.7k
- 派生
- 641
- PR 合并指标
- 30 天内没有已合并 PR
描述
Hello,
When developing a shiny app for a data visualisation dashboard, I encountered an issue that geom_phylopic() isn't integrated with plotly yet. I have pasted the error below. Is there any plans to have this integrated? I (think I) have created a reprex showing two plots that work and the one with plotly with the error.
Thanks,
Jo
geom_GeomPhylopic() 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
library(rphylopic)
library(ggplot2)
library(plotly)
# get image from phylopic and set up df
silhouette.img <- get_phylopic(uuid = get_uuid(name = "Sphyrnidae", n=1)) # hammerhead
silhouette.df <- data.frame(x=1, y=9)
# make some fake data
df = data.frame(x=c(1:10),
y=c(1:10))
# this plot works
p = ggplot() +
geom_point(data = df, aes(x=x, y=y)) +
theme_bw() +
# geom_phylopic(data = silhouette.df, aes(x = x, y = y),
# size = 1, col='purple',
# img = silhouette.img) +
xlim(0,10)
p %>% ggplotly(tooltip = c("x"))
# this plot works
p = ggplot() +
geom_point(data = df, aes(x=x, y=y)) +
theme_bw() +
geom_phylopic(data = silhouette.df, aes(x = x, y = y),
size = 1, col='purple',
img = silhouette.img) +
xlim(0,10)
p
# this plot does not work
p = ggplot() +
geom_point(data = df, aes(x=x, y=y)) +
theme_bw() +
geom_phylopic(data = silhouette.df, aes(x = x, y = y),
size = 1, col='purple',
img = silhouette.img) +
xlim(0,10)
p %>% ggplotly(tooltip = c("x"))
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先,运行提供的 R reprex,并使用 geom_phylopic() 和 ggplotly(),以复现不支持的 geom 错误。阅读现有的 ggplotly() 对不支持的 geom 的处理,并确定如何测试这一集成。完成的标准是:示例能够通过 ggplotly() 渲染且不出现实现错误,同时保留绘制的 phylopic 图像和 tooltip 行为。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- plotly, r
- 领域
- data-visualization
- Issue 类型
- 功能
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100