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

From: Marius Hofert <m_hofert_at_web.de>
Date: Tue, 04 Jan 2011 10:53:33 +0100

Dear expeRts,

As you can see from this example...

trellis.device("pdf", width = 5, height = 5)   print(xyplot(0 ~ 0, main = "This title is not 'centered' for the human's eye", scales = list(alternating = c(1,1), tck = c(1,0)))) dev.off()

... the title does not seem to be "centered" for the human's eye [although it is centered when the plot (width) is considered with the y-axis label]. I could not easily (via trellis.par.get()) find a way to adjust this. Of course one could include more spaces in the title string, but is there a more elegant way to slightly shift the title to the right?



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 Tue 04 Jan 2011 - 09:58:04 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 Tue 04 Jan 2011 - 16:20:04 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