[R] Help with lattice
deepayan.sarkar at gmail.com
Sat Mar 28 19:53:38 CET 2009
On 3/24/09, Steve_Friedman at nps.gov <Steve_Friedman at nps.gov> wrote:
> I'm working on a windows XP machine with R 2.8.1
> I'm working with lattice and I don't understand how to set the size of the
> text for the labels. Can anyone suggest a solution?
> I'm establishing a melted dataframe first and then setting a key and
> calling the plot as follows;
> > key.variable <- list(space = "right", text =
> list(levels(wbirdm$variable)), points = list(pch = 1:3, col=c(1:9)))
> > dotplot(wbirdm$value ~ wbirdm$variable | wbirdm$Region, col=c(1:9), pch=
> rep(c(1:3), key = key.variable, groups=wbirdm$variable, ylab= "Mean HSI"))
> This works pretty well, with the exception that the size of x axis labels
> is too large.
This should give you a hint.
xyplot(1 ~ 1, scales = list(x = list(cex = 2)))
> Also, the key does not appear.
We need a reproducible example. BTW, the recommended style is
dotplot(value ~ variable | Region, data = wbirdm,
key = key.variable, groups=variable, ylab= "Mean HSI"))
More information about the R-help