On Tue, Jan 4, 2011 at 9:32 PM, Dieter Menne <dieter.me...@menne-biomed.de> wrote: > > > mhofert wrote: >> >> 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]. >> > > This is because there is a y label, and centering is on the page (as you > noted). One way around this would be to add a similar padding at the right > side. See the example below, where I have exaggerated the effect. Try a > padding of 5 instead.
You can also use 'xlab.top' instead of 'main' with the version of lattice available at r-forge (to be uploaded to CRAN soon-ish). -Deepayan ______________________________________________ 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.