[R] lattice multipanel strip placement - with two factors

Dan Kortschak dan.kortschak at adelaide.edu.au
Mon Mar 23 07:54:33 CET 2009


Hi,

I'm making a multipanel lattice densityplot figure with 2 factors (3 and
20 classes in each factor) with the following statement (the
type="percent" is there to prevent plotting the actual points which
detract from the figure - is there another way of doing this?):

densityplot(~End-Begin | Type * Chromosome, data=Mon, layout=c(5,12),
xlab="Element Length",type="percent", col="grey60",
strip=strip.custom(style=3, bg="grey90", par.strip.text=list(cex=0.5)))

Plotting 60 panels and associated strips on a page leaves the whole
thing pretty tight and so I'd like to move the 3 class factor strips to
the left margin of the whole figure.

Like so (pardon the ASCII art):

+-+----+----+----+----+----+
+ +----+----+----+----+----+
| |    |    |    |    |    |
+A+----+----+----+----+----+
+ +----+----+----+----+----+
| |    |    |    |    |    |
+-+----+----+----+----+----+
+ +----+----+----+----+----+
| |    |    |    |    |    |
+B+----+----+----+----+----+
+ +----+----+----+----+----+
| |    |    |    |    |    |
+-+----+----+----+----+----+
+ +----+----+----+----+----+
| |    |    |    |    |    |
+C+----+----+----+----+----+
+ +----+----+----+----+----+
| |    |    |    |    |    |
+-+----+----+----+----+----+

Is this possible with lattice and if so, what do I need to do to get it.
I've tried strip.left=TRUE and that just make the problem a horizontal
one rather than a vertical one.

Any help is greatly appreciated.

thanks
Dan




More information about the R-help mailing list