1

I've been experimenting using riot's api and wanted to plot champion kills/death onto the map of the rift. But the map doesn't seem to fill the plot area so the points don't match the map.

Below is the code I was using to make the plot and its output. Any suggestions on how to fix?

library(ggplot2)
library(jpeg)
library(grid)

path="mypath"
img=readJPEG(path)
img=rasterGrob(img,interpolate=TRUE)
ggplot(data=jk,aes(x=x,y=y))+coord_cartesian(xlim=c(-200,15000),ylim=c(-200,15000))+
annotation_custom(img, xmin=-Inf, xmax=Inf, ymin=-Inf,ymax=Inf)+ geom_point(color="red")+facet_wrap(vars(role))

enter image description here

majulito
  • 11
  • 1
  • Have you tried this: https://hextechdocs.dev/map-data/ ? – DarkIntaqt Nov 07 '22 at 17:16
  • Thank you for the resource as the reference points are useful. However it doesn't really address the issue with the map not scaling to the plot area so I can plot over it. – majulito Nov 08 '22 at 04:37

0 Answers0