[R] Lattice: hiding only some strips

Michael Hoffman b3i4old02 at sneakemail.com
Sat Jun 23 12:49:07 CEST 2007


deepayan.sarkar at gmail.com wrote:
> On 6/22/07, Michael Hoffman <b3i4old02 at sneakemail.com> wrote:
>> What I want is to draw strips at the very top of the plot and not to
>> draw strips that are between panels.
 >
> xyplot(mpg ~ disp | factor(cyl) * HP, mtcars,
>        par.strip.text = list(lines = 0.5),
>        strip = function(which.given, which.panel, ...) {
>            if (which.given == 1)
>                strip.default(which.given = 1,
>                              which.panel = which.panel[which.given],
>                              ...)
>        },
>        par.settings =
>        list(layout.heights =
>             list(strip = rep(c(0, 1), c(5, 1)))))

Thanks, this is just what I was looking for.
-- 
Michael



More information about the R-help mailing list