[R] Difficulty implementing "scales" in a lattice plot

Deepayan Sarkar deepayan at stat.wisc.edu
Fri Dec 3 05:03:05 CET 2004


On Thursday 02 December 2004 21:19, Greg Blevins wrote:
> Hello all,
>
> I am rather new to lattice and have a simple question regarding
> formatting text labels on the axes. I have looked through my own
> archive on lattice notes, searched and examined 30 or so hits on Dr.
> Baron's search site, looked through my MASS book, my Data Analysis
> and Graphics Using R book, R news articles, and I have in my hand the
> lattice package instructions and have read and re-read the "scales"
> section. Here is the problem I am having.
>
> Scanf is a factor with 20 levels and the mean values for these levels
> are being plotted with CIs.
>
> I am trying to reduce the text size for the labels for this variable.
> The first function below does not attempt to set the text size for
> the y axes, and all works well.
>
>   xx2 <- with(xx,summarize(q27a, llist(Scanf,bumo), smean.cl.boot,
> conf.int=.90)) Dotplot(Scanf ~ Cbind(q27a,Lower, Upper)| bumo,
> xlim=c(5,10),cex=.6, par.strip.text=list(cex=.8), xlab="",main="",
> data=xx2)
>
> Now, when I add to the above function, scales=(cex=.5), as I show in
> the function below, the graph reduces the size of the y labels, but
> now, rather than the text labels printing, the numbers 5, 10, 15, 20
> appear on y--in other words the numeric values are used. xx2 <-
> with(xx,summarize(q27a, llist(Scanf,bumo), smean.cl.boot,
> conf.int=.90)) Dotplot(Scanf ~ Cbind(q27a,Lower, Upper)| bumo,
> xlim=c(5,10), cex=.6, scales = (cex=.5)),
> par.strip.text=list(cex=.8), xlab="",main="", data=xx2) So, seeking
> advice on how to reduce text size while retaining the text labels for
> the Scanf variable.

This doesn't really make sense, since scales has to be either a list or 
a character string. Your example is not reproducible either, so I'm 
guessing, but perhaps you want 

  scales = list(y = list(cex = 0.5))

?


Deepayan




More information about the R-help mailing list