You are looking for annotation_raster
and readPNG
mypngfile <- download.file('http://api.altmetric.com/donut/502878_64x64.png', destfile = 'mypng.png', mode = 'wb')
library(png)
mypng <- readPNG('mypng.png')
p <- qplot(mpg, wt, data = mtcars) + theme_bw()
p + annotation_raster(mypng, ymin = 4.5,ymax= 5,xmin = 30,xmax = 35) +
geom_point()
These new features (and more examples) are described here
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…