I have this nice custom plot function based on ggplot2
What I would now like to do, is to place several plots drawn with this function on top of a background image (loaded in as a png).
I do not want to place the plots on a regular grid, but rather at select locations on the image.
(An example of such a plot is can be seen on http://www.climatechange2013.org/images/figures/WGI_AR5_Fig10-21.jpg)
It seems to me that I will need to have each of my plots drawn within a distinct environment, and a method for placing these environments at select coordinates on the image.
Can anyone direct me to the right packages/tutorial/blogs/etc that could be of use for this?
Sincerely, Halldór
Have a look at Embedded Plots via ggplot: http://vita.had.co.nz/papers/embedded-plots.pdf and
ggsubplot
-Packages.Or do it "by hand" via-
ggplot2::annotation_raster
.Taking this Image: http://pixabay.com/static/uploads/photo/2012/04/16/12/34/squares-35798_640.png
Now you can add whatever layer
geom_...
you want. Probably you need to modifyxmin, xmax, ymin, ymax
accordingly.