I wanted to generate two images of different sizes, but show them side-by-side. Is this possible?
This works, but then they have to be the same size:
You can also use grid.arrange from gridExtra which works with grob or ggplot objects
require(gridExtra)
pre_fig <- rasterGrob(readPNG("paper_figures/surf_0000.png"), interpolate=TRUE)
post_fig <- rasterGrob(readPNG("paper_figures/surf_0044.png"), interpolate=TRUE)
grid.arrange(pre_fig, post_fig, ncol=2)