Mike Williamson
2009-Apr-08 01:32 UTC
[R] how to adjust titles on sub-plots in levelplot / contour plot?
Hello, 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. The function works OK, except that when the variables in the "splitCol" column get very large (as they are in this data set I have attached), it cannot print the whole thing in the "trellis subplot", the little title above each sub-plot that is generated. I have also attached a picture which shows how the graph looks (when run in my environment... hopefully you will see similarly). 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. Thanks in advance! Mike ########################## Plot call: try(print(levelplot(dataCol ~ siteX * siteY | splitCol, data miniDataSet, col.regions=rainbow(n=length(unique(miniDataSet$dataCol))+5, start=0.5,end=0.95), layout = 16, shrink = c(0.6, 1.1), at = c(0.5,0.625,0.75,0.875,1), xlab=list(label="Site", cex=1), ylab=list(label="Site", cex=1), scales = list(cex=1), main=list(label="Dummy Title", cex=1), colorkey=list(labels=list(cex=1))))) ########################## -- "The squirrel has not yet found the acorn that will grow into the oak that will be cut to form the cradle of the babe who will grow to slay me." -------------- next part -------------- A non-text attachment was scrubbed... Name: TSL14.R2_ET4A_02_M8_Opens_Yld.001.png Type: image/png Size: 57363 bytes Desc: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20090407/74ffa945/attachment-0002.png>
Dieter Menne
2009-Apr-08 06:45 UTC
[R] how to adjust titles on sub-plots in levelplot / contour plot?
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