Folks:

I would like to write two lines of text in two different font sizes (or
faces or ...) as the title ("main") of a trellis plot.  The following code
does it, but not well:

xyplot((0:1)~(0:1),
        main = textGrob(lab=c("Some Text","Some More Text"),y=c(.95,.8),
                        gp=gpar(cex=c(1.2,1.0)))
        )

There is too much space between the title text and the plot. I assume that
can be fixed by fooling with padding settings in lattice.options(), but my
question is: Is there a better, simpler way to do this? 
Would using grid graphics directly by pushing title and plot viewports and
then adding the lattice graph to the plot viewport be a better way to go?

OS = Windows XP
R = 2.11.0 
lattice_0.18-3
device = windows

 
Bert Gunter
Genentech Nonclinical Biostatistics
 
 

______________________________________________
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.

Reply via email to