I know that grid.arrange
allows me to put two, or more, graphs beside each other with ggplot. How do I put a graph inside of another graph? If you can remember back to the 1990's this used to be called PIP Picture-In-Picture. Let's use this as our reproducible data.
library(ggplot2)
(plotx <- ggplot(mpg, aes(displ, hwy)) + geom_point())
In case you're not clear on what I want I'll try and ASCII it out below:
---------------------------------
| |
| --------- |
| | plotx | |
| --------- |
| same plotx |
| |
---------------------------------