Suppose that I have a previously-rendered plot in pdf format. The code used to generate it is not available. I would like to render this external.pdf as a subfigure in a larger, composite plot. For example, using cowplot I might want to do
library( ggplot2 )
## A <- ...how to load external.pdf here?
B <- ggplot( iris, aes(x=Petal.Length, y=Petal.Width) ) + geom_point()
cowplot::plot_grid(A, B, labels=c("A","B")) + ggsave("composite.pdf")
Is there a way to load and render external.pdf, while preserving its vector graphics format?
"Data":
ggplot( mtcars, aes(x=wt,y=mpg) ) + geom_point() + ggsave("external.pdf")