Created
December 6, 2018 11:31
-
-
Save ColinFay/6ca30c4ef304e03970e06db1be14565f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
download.file("https://images1.westword.com/imager/u/745xauto/9813472/mg_3662.jpg", "img.jpg") | |
img <- jpeg::readJPEG("img.jpg") | |
library(ggplot2) | |
ggplot(iris, aes(Sepal.Length, Sepal.Width, color = Species)) + | |
annotation_custom(rasterGrob(img, | |
width = unit(1,"npc"), | |
height = unit(1,"npc"))) + | |
geom_point() | |
unlink("img.jpg") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment