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 strip.default documentation suggests that Deepayan intended this behavior. Still, it would help to be able to use the strip argument for single-panel plots. Is there a simple way to do this? Thank you, John
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.
> >> The strip argument to panel.xyplot seems to be ignored for >> single-panel plots.> 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)Thank you. That works. John