[R] lattice: how to "center" a subtitle?

From: Marius Hofert <m_hofert_at_web.de>
Date: Mon, 04 Apr 2011 13:39:57 +0200


Dear expeRts,

I recently asked for a real "centered" title (see, e.g., http://tolstoy.newcastle.edu.au/R/e13/help/11/01/0135.html). A nice solution (from Deepayan Sarkar) is to use "xlab.top" instead of "main":

library(lattice)
trellis.device("pdf")
print(xyplot(0 ~ 0, xlab.top = "This title is now 'centered' for the human's eye", sub = "but subtitles are not centered", scales = list(alternating = c(1,1), tck = c(1,0)))) dev.off()

My question is whether there is something similar for *sub*titles [so something like "xlab.bottom"]? As you can see from the plot, the subtitle does not seem to be "centered" for the human's eye. I would like to center it according to the x-axis label.

Cheers,

Marius



R-help_at_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. Received on Mon 04 Apr 2011 - 11:44:02 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 04 Apr 2011 - 15:10:28 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive