Skip to content

changing order of lattice plots

3 messages · Dimitris Rizopoulos, Dan Kortschak

#
Hi,

This is another question relating to my 2 factor figure.

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)))

I would like to flip the plot so those at the bottom are at the top and
so on. I have tried using a `index.cond=list(60:1)' (I have 3 classes
for Chromosome and 20 classes for Type) parameter - this approximates
what I want while I sort out the syntax. But I get `Error in
cond.orders(foo) : Invalid value of index.cond' returned.

The equivalent parameter for a 1x3 plot:

histogram(~Length/1000 | Chromosome, data=readlengths, layout=c(1,3),
xlab="Contig Length (kb)", nint=25, type="count", col="grey60",
index.cond=list(3:1), strip=strip.custom(bg="grey90"))

works fine, so I'm not sure where to go from here.

Any help is greatly appreciated.

thanks
Dan
#
try setting the 'as.table' argument to TRUE, e.g.,

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)),
as.table = TRUE)


I hope it helps.

Best,
Dimitris
Dan Kortschak wrote:

  
    
#
Perfect! Thanks.

Dan
On Mon, 2009-03-23 at 08:35 +0100, Dimitris Rizopoulos wrote: