Re: [R] about xyplot in lattice

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

On 1/27/06, <> 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


       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.



______________________________________________ mailing list
PLEASE do read the posting guide!
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