implementing ggimage with plotly
Open
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 2.7k
- Forks
- 641
- PR merge metrics
- No merged PRs in 30d
Description
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

Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No repository file, test, or entry point is named. Start by clarifying a minimal reproducible example and the required interactive behavior for image markers, then identify the plotly.R conversion path that handles the supplied ggplot2 layer. Done means the requested chart can be reproduced interactively with logos and the behavior is covered by an appropriate test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- data-visualization
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100