[R] lattice: axes drawn when relation='free' or relation='sliced' but not when relation='same'

John G. Bullock john.bullock at aya.yale.edu
Wed Dec 19 21:55:26 CET 2007


I'm using lattice to draw a multi-panel figure: 5 rows, 4 columns.  The y-axis for each panel is determined by

  yaxs            <- list(draw=T
                          , labels=c(0, '.5', '1', '1.5')
                          , at=c(0, .5, 1, 1.5)
                          , tck=c(.4, 0)
                          , cex=.7
                          , alternating=2
                          , relation='same'
                          , rot=90)

fig1 <- xyplot( [...], scales=list(x=xaxs, y=yaxs))

I want this to draw ticks and labels on the left-hand side of each panel.  Instead, I get ticks on the left-hand side of only the
panels in the leftmost column, and labels only on the right-hand side of the rightmost column.  What can account for that?

What seems especially peculiar is that when I change relation to 'sliced' or 'free', the axes are drawn as I want them to be drawn.

The data that I'm plotting are numeric and range from -.3 to 1.9.  I'm using R 2.6.1 and lattice 0.17-2 on Windows XP.

Thank you,
--John



More information about the R-help mailing list