[R] latticeExtra: useOuterStrips and axis.line$lwd

tyler tyler.smith at mail.mcgill.ca
Tue Apr 28 16:40:18 CEST 2009


Hi,

I'm working on some lattice wireframe figures that have two conditioning
factors, and I want the strips labelled on the top and left of the
entire plot, rather than above each individual panel. useOuterStrips()
does this, but it draws internal axis lines, even after I explicitly set
axis.line to 0. Is there a way to use useOuterStrips but without axis
boxes?

I've included a short example. I know the example looks odd without axis
lines, but in my more complicated wireframe plots I think the axis
lines are just extra clutter, so I'd like them to disappear.

Thanks,

Tyler


library(lattice)
my.trellis.pars <- trellis.par.get("axis.line")
my.trellis.pars$lwd = 0
mtcars$HP <- equal.count(mtcars$hp)

trellis.par.set("axis.line", my.trellis.pars)
xyplot(mpg ~ disp | HP + factor(cyl), mtcars)

useOuterStrips(xyplot(mpg ~ disp | HP + factor(cyl), mtcars))

-- 
The purpose of models is not to fit the data but to sharpen the
questions.                             --Samuel Karlin




More information about the R-help mailing list