Skip to content

Instantly share code, notes, and snippets.

@danielecook
Created December 6, 2017 22:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danielecook/d2bb89371403073ae9e6b024dca88c05 to your computer and use it in GitHub Desktop.
Save danielecook/d2bb89371403073ae9e6b024dca88c05 to your computer and use it in GitHub Desktop.
Plot png in ggplot/cowplot #ggplot #cowplot
library(imager)
library(cowplot)
im <- imager::load.image("https://storage.googleapis.com/elegansvariation.org/photos/hawaii2017/C-3273.jpg")
plot <- ggplot() + annotation_raster(im, xmin=-Inf, xmax=Inf, ymin=-Inf, ymax=Inf)
cowplot::plot_grid(plot, plot)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment