(This article was first published on 0xCAFEBABE, and kindly contributed to R-bloggers)
I had quite a fight with R to put multiple levelplots with a shared title and subtite on the same chart, so I thought I put a PoC code here: library(lattice)The result should be something similar like this:
m <- matrix(c(0.1,0.2,0.3,0.4), 2, 2)
col.l <- colorRampPalette(c('blue', 'green'))(30)
plot.new()
par(mfrow=c(2,2), oma=c(2,0,2,0))
print(levelplot(m, col.regions=col.l, main="L1"), split=c(1, 1, 2, 2))
print(levelplot(m, col.regions=col.l, main="L2"), split=c(1, 2, 2, 2), newpage=FALSE)
print(levelplot(m, col.regions=col.l, main="L3"), split=c(2, 1, 2, 2), newpage=FALSE)
print(levelplot(m, col.regions=col.l, main="L4"), split=c(2, 2, 2, 2), newpage=FALSE)
title("Centered Overall Title", outer=TRUE)
mtext(side=1, "Centered Subtitle", outer=TRUE)
To leave a comment for the author, please follow the link and comment on his blog: 0xCAFEBABE.
R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series,ecdf, trading) and more...


Zero Inflated Models and Generalized Linear Mixed Models with R.
Zuur, Saveliev, Ieno (2012).