On Thu, Dec 16, 2010 at 11:26 PM, David Winsemius <[email protected]> wrote: > > On Dec 16, 2010, at 11:12 PM, Rajarshi Guha wrote: > >> Hi, I have a series of lattice plots which I am arranging in a 2x2 >> grid via print: >> >> print(p.preds, split=c(1,1, 2,2), more=TRUE) >> print(p.comp, split=c(2,1,2,2), more=TRUE) >> print(p.bw, split=c(1,2,2,2), more=FALSE) >> >> What I'd like to have is a letter (A, B, ...) in the top corner of >> each plot. While panel.text lets me add text anywhere within a plot, I >> can't seem to workout how I could put some text in the top left >> corner, say, of the whole plotting region. > ########>>>>>>>>> >> >> and provide commented, minimal, self-contained, reproducible code.
Apologies for an incomplete post. Example code, based on Gabors suggestion is library(gridExtra) p1 <- xyplot(demand ~ Time, BOD) p2 <- xyplot(demand ~ Time, BOD) p3 <- xyplot(demand ~ Time, BOD) print(p1, split=c(1,1,2,2), more=TRUE) print(p2, split=c(2,1,2,2), more=TRUE) print(p3, split=c(1,2,2,2), more=FALSE) However, Gabors approach places the mark within the plot itself. What I'd ideally like is to have the mark be located in the margins, in the top right corner. (I am not sure of the correct terminology here). An example of the desired output can be seen at http://rguha.net/plot-annot.png -- Rajarshi Guha NIH Chemical Genomics Center ______________________________________________ [email protected] 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.

