On Jan 11, 2011, at 2:06 PM, Eduardo de Oliveira Horta wrote:
Is there a way to achieve lbl=c("a", "b", "c", "d") opar <- par(mfrow=c(2,2), ann=FALSE) for (t in 1:4){ plot(seq(from=1,to=2*pi,length=100), sin(t*seq(from=1,to=2*pi,length=100)), type="l") title(main=paste("(", lbl[t], ")", sep="")) } par(opar)
opar <- par(mfrow=c(2,2), ann=FALSE) for (t in 1:4){ plot(seq(from=1,to=2*pi,length=100), sin(t*seq(from=1,to=2*pi,length=100)), type="l") title(main=bquote("("*.(letters[t])*")") ) } par(opar)
without having to use an object like 'lbl'?
(You obviously need something from which to construct the titles.)
More generally: is it possible to iteratively (as in a loop) add alphabetic titles to multi-plot graphics when the range over which 't' above varies is of an arbitrary length? It is important that ann=FALSE, because I don't want the axes labels. Thanks in advance, and best regards. Eduardo Horta ______________________________________________
David Winsemius, MD West Hartford, CT ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.