Re: [R] Lattice levelplot- remove unused levels per panel

2013-01-20 Thread Richard M. Heiberger
require(lattice) require(latticeExtra) data(mtcars) mt2 <- mtcars mt2$vs <- factor(mtcars$vs) mt2$cyl <- factor(mtcars$cyl) mt2$gear <- factor(mtcars$gear) lp2 <- levelplot(mpg ~ cyl*gear | vs, data=mt2, strip=strip.custom(strip.names=c(TRUE,TRUE)), scales=list(x=

Re: [R] Lattice levelplot- remove unused levels per panel

2013-01-20 Thread ilai
On Sun, Jan 20, 2013 at 1:59 AM, ronny wrote: > Hi, > > I am using levelplot, and would like remove from each panel (condition) its > unused x levels. > Uneven scales on categorical axes lead to distortion and a miss representation (as in your example - the area for levels 4,6 in vs1 will be big

[R] Lattice levelplot- remove unused levels per panel

2013-01-20 Thread ronny
Hi, I am using levelplot, and would like remove from each panel (condition) its unused x levels. e.g. Remove from panel vs=1 the cyl level=8. data(mtcars) levelplot(mpg~factor(cyl)*factor(gear)|factor(vs)) Thanks for your help, Ronny -- View this message in context: http://r.789695.n4.nabbl