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
changing order of lattice plots
3 messages · Dimitris Rizopoulos, Dan Kortschak
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:
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
______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Dimitris Rizopoulos Assistant Professor Department of Biostatistics Erasmus University Medical Center Address: PO Box 2040, 3000 CA Rotterdam, the Netherlands Tel: +31/(0)10/7043478 Fax: +31/(0)10/7043014
Perfect! Thanks. Dan
On Mon, 2009-03-23 at 08:35 +0100, Dimitris Rizopoulos wrote:
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