Dear Martin, Would ------------- library(latticeExtra) useOuterStrips(p) ------------- be useful for you? Gerrit.
---------------------------------------------------------------------- Message: 1 Date: Mon, 10 Feb 2014 14:12:45 +0200 (EET) From: Martin Ivanov <tra...@abv.bg> To: Pascal Oettli <kri...@ymail.com> Cc: r-help@r-project.org Subject: Re: [R] lattice question: removing strips Message-ID: <999135689.229399.1392034366300.javamail.apa...@mail21.abv.bg> Content-Type: text/plain; charset="UTF-8" Dear Pascal, Thank You very much for Your reply. Here is a minimal working example: library(lattice); # this is with both strips plotted: data <- data.frame(x=1:5, y=6:10, f1=c("a1", "a1", "a1", "a2", "a3"), f2=c("b1", "b2", "b2", "b1", "b2")); p <- xyplot(y ~ x | f1 + f2, data=data) print(p); # and this is my attempt to only plot the strips for the second conditioning variable, i.e. for f2: my.strip <- function(which.given, strip.levels, ...) { if(which.given == 1) { return(FALSE); } else { strip.default(which.given=which.given, strip.levels=c(TRUE, FALSE), ...); } } p1 <- xyplot(y ~ x | f1 + f2, data=data, strip=my.strip) print(p1); #As You can see, here I do not get the strips for f1 potted, but there is an empty space below the strips for f1, which I cannot get rid of. I only want to show the strips for f2. Directly below them I want to see the panels themselves, instead of an empty space for the missing f1 strips. Any suggestions? Best regards, Martin
______________________________________________ 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.