Skip to content
Prev 325051 / 398503 Next

Using Lattice, LatticeExtra - Hide right and top axes in multipanel plots

Hi

You had to references to strip
The axis.line in the par settings removes the axis line
Have made some slight changes to your code which may be of interest

I keep the panel arguments last and so avoid duplication


         require(grid)
xyplot(b~t|G,data=q2,groups=grp,
        type="l",
        aspect = 1,
        as.table=T,
        layout=c(3,1),
         xlab="t",
         ylab="b",
         main="Overlay of Profiles by Schools and Classes",
         par.settings=list(layout.heights = list(strip =2),
                           axis.line=list(col=0)),
        strip=strip.custom(strip.names=T,strip.levels=T,par.strip.text=list(cex=1.7,font=2),bg=0,var.name="School"),
        scales=list(x=list(rela='free',alternating=0),
                    y=list(rela='free',alternating=0),
                           col=1,
                           tck=c(1,0)),
        panel=panel.superpose,
        panel.groups=function(x=x,y=y,subscripts=subscripts,groups=groups,...,group.number){

          panel.axis(side="top",labels = F,draw.labels = F,ticks = F, 
line.lwd=0, line.alpha=0)
          panel.xyplot(x=x,y=y,subscripts=subscripts,
                       lwd=1,type="l",
                       col=q2$dcol[subscripts],
                       lty=1,
                       cex=0.7)
         }
)

Duncan

Duncan Mackay
Department of Agronomy and Soil Science
University of New England
Armidale NSW 2351
Email: home: mackay at northnet.com.au
At 11:04 10/06/2013, you wrote: