[R] Alphabetic labels on multi-plot graphics

Eduardo de Oliveira Horta eduardo.oliveirahorta at gmail.com
Tue Jan 11 20:06:41 CET 2011


Is there a way to achieve

lbl=c("a", "b", "c", "d")

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=""))
}

without having to use an object like 'lbl'?

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



More information about the R-help mailing list