library(ggplot2)
if (FALSE) {
n <- 50
df <- expand.grid(x = 1:n,y = 1:n)[sample(n^2,.5*n^2),]
qplot(x, y, data = df, geom = 'tile')
qplot(x, y, data = df, geom = 'tile') + theme_nothing()
qplot(1:10, 1:10) +
annotation_custom(
grob = ggplotGrob(qplot(1:10,1:10)),
8, Inf, -Inf, 2
)
qplot(1:10, 1:10) +
annotation_custom(
grob = ggplotGrob(qplot(1:10,1:10) + theme_nothing()),
8, Inf, -Inf, 2
)
qplot(1:10, 1:10) +
annotation_custom(
grob = ggplotGrob(qplot(1:10,1:10) + theme_inset()),
8, Inf, -Inf, 2
)
}
Run the code above in your browser using DataLab