Re: [R] about xyplot in lattice

From: Deepayan Sarkar <deepayan.sarkar_at_gmail.com>
Date: Sat 28 Jan 2006 - 17:33:14 EST

On 1/27/06, Jin.Li@csiro.au <Jin.Li@csiro.au> wrote:
> Hi all,
>
>
>
> I am using xyplot (lattice) to generate a figure like Figure 4.18 in
> MASS4, but I have the following two questions (1) how to change the font
> of x(y)lab?

Something like

xyplot(...

       xlab = list("foo", font = 3),

       ...)

fontface and fontfamily may be specified in the list too, although the documentation fails to mention this.

(2) how to plot the panels for each level of the conditional
> variable (a factor in my data set) in the order as occurred in the
> data.frame rather than in the order of the levels of the conditioning
> variable?

Not possible directly, you have to change the order somehow. The easiest is to specify the order when creating the factor explicitly, e.g.

newf <- factor(f, levels = unique(f))

This should work fine even if f is already a factor.

Deepayan

--
http://www.stat.wisc.edu/~deepayan/

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Sat Jan 28 17:42:49 2006

This archive was generated by hypermail 2.1.8 : Sat 28 Jan 2006 - 20:12:49 EST