Re: [R] lattice: drawing strips for single-panel plots

From: Dieter Menne <dieter.menne_at_menne-biomed.de>
Date: Sat, 05 Mar 2011 01:48:13 -0800 (PST)

John G. Bullock-2 wrote:
>
> The strip argument to panel.xyplot seems to be ignored for single-panel
> plots. Here is an example:
>
> data(Chem97, package = "mlmRev")
> myStrip <- function(...) { ltext(.5, .5, 'strip text') }
> densityplot(~ gcsescore, data = Chem97, strip=myStrip)
>
> The figure is printed with no strip.
>

The workaround is to give it a one-level factor:

library(lattice)
data(Chem97, package = "mlmRev")
Chem97$what = as.factor("strip text")
densityplot(~ gcsescore|what, data = Chem97)

--
View this message in context: http://r.789695.n4.nabble.com/lattice-drawing-strips-for-single-panel-plots-tp3336364p3336450.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
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.
Received on Sat 05 Mar 2011 - 09:51:41 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sat 05 Mar 2011 - 12:20:20 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive