implementing ggimage with plotly
未关闭
还没有人认领这个 Issue。
- 主要语言
- R
- 星标
- 2.7k
- 派生
- 641
- PR 合并指标
- 30 天内没有已合并 PR
描述
Hi, Please help me!
I want to implement gg_image into plotly because I want an interactive visual with logos, but can't do that...
library(plotly)
library(dplyr)
# insert reprex here
summit_league%>%
ggplot(aes(x =DSQ , y = OSQ))+
geom_image(aes(image = img), size = 0.075, asp = 16 / 9)+
#geom_text(aes(label = Teams))+
#geom_label(aes(label=Teams), colour = "orange", fontface = "bold", size=3)+
labs(
x = "DSQ rank",
y = "OSQ rank",
title = "Summit League ShotQuality Rank"
) +
theme_bw()+
theme(plot.background = element_rect(fill = "orange"))+
theme(
plot.title = element_text(size = 12, hjust = 0.5, face = "bold")
)
theme(axis.text.y = element_text(angle = 0))+
theme(axis.title.y = element_text(face="bold"),
axis.ticks.y = element_blank(),
axis.text.y = element_blank())+
theme(axis.title.x = element_text(face="bold"),
axis.ticks.x = element_blank(),
axis.text.x = element_blank())+
theme(panel.border = element_blank(),
# Remove panel grid lines
panel.grid.major = element_blank(),
panel.grid.minor = element_blank())+
# Remove panel background
geom_hline(yintercept=.5, color = "grey")+
geom_vline(xintercept=.5, color ="grey")+
scale_x_continuous(limits=c(0, 1))+
scale_y_continuous(limits=c(0, 1))+
geom_text(x=0.04, y=.55, label="Better Offense", colour ="orange", size=3.5)+
geom_text(x=0.04, y=.6, label="↑", colour ="orange", size=6)+
geom_text(x=0.59, y=-.02, label="Better Defense", colour ="orange", size=3.5)+
geom_text(x=0.67, y=-.02, label="→", colour ="orange", size=6)
I want to reproduce this image but in plotly

贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
没有指定 repository 文件、测试或入口点。首先明确一个最小可复现示例,以及图像标记所需的交互行为,然后确定处理所提供 ggplot2 图层的 plotly.R 转换路径。完成的标准是:所请求的图表可以带有徽标以交互方式复现,并且该行为由适当的测试覆盖。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- r
- 领域
- data-visualization
- Issue 类型
- 功能
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 20/100