[R] how to adjust titles on sub-plots in levelplot / contour plot?

Dieter Menne dieter.menne at menne-biomed.de
Wed Apr 8 08:45:43 CEST 2009


Mike Williamson <this.is.mvw <at> gmail.com> writes:

>     I have a (relatively long) function script that generates a levelplot.
> I don't want to include all of the code, so I have attached in file
> "miniDataSet.csv" an example for the data set "miniDataSet" that is called
> below.

Thanks for providing a full example; since the question is "how to get a 
smaller font in strip", a simple example from xyplot would have been 
easier.

> You'll notice in the yellow "sub-plot titles" that much of
> the name has been cut off.  In looking through all the documentation, I
> cannot seem to find anything that mentions how to adjust the scaling of
> these sub-plot titles.

library(lattice)
str(trellis.par.get())
# strange, nothing there that looks like strip.text.cex (why? don't know)
# Try a search
# http://markmail.org/message/dpx6c7xozn6qn52v

Depth <- equal.count(quakes$depth, number=8, overlap=.1)
xyplot(lat ~ long | Depth, data = quakes,
  par.strip.text=list(cex=0.5))

Dieter




More information about the R-help mailing list