On Sun, Jan 20, 2013 at 1:59 AM, ronny <ronny.rechtman@evogene.com> 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
bigger than for vs0). In short, don't do it. IMO a solution such as
levelplot(mpg ~ factor(cyl) * factor(gear) | factor(vs) , mtcars,
par.settings=list(panel.background=list(col='grey')))

is much better. Note, your request could make sense for some continuous
variables, so if you insist you could always
levelplot(mpg ~ as.numeric(cyl) * factor(gear) | factor(vs) , mtcars,
scales=list(x=list(relation='free')))

HTH


> 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.nabble.com/Lattice-levelplot-remove-unused-levels-per-panel-tp4656087.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help@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.
>

	[[alternative HTML version deleted]]

