Hi Duncan, Thanks for your reply. It is my understanding the whole problem arises from using 'relation = free'. It looks like xlab.top ignores this and positions the labels as if 'relation = same'. My example is actually a simplified version of a much more complicated plot. It creates a 12 by 5 grid of individual panels with measurements from different stations assembled in the 5 columns and different parameters in the 12 rows. There are 110 stations, and with 5 stations per page a total of 22 pages is created... xlab.top would give me the required flexibility to dynamically add row titles, i.e., I use a variable in the label argument of xlab.top to place the different station specs as row titles. grid.text may not work because I don't want to have titles in the rows 2 to 12. Best, Manuel -- View this message in context: http://r.789695.n4.nabble.com/lattice-column-titles-using-xlab-top-in-multipanel-xyplot-tp4659610p4659974.html Sent from the R help mailing list archive at Nabble.com.
lattice: column titles using xlab.top in multipanel xyplot
2 messages · mntu
ok, found a workaround using 'useOuterStrips':
#Example:
require(lattice)
#require(latticeExtra)
f <- data.frame(a = c(1:40), b = c(1:10, 20:29, 990:999, 20:29),
d = c(rep("A", 20), rep("B", 20)),
e = c(rep("X", 10), rep("Y", 10), rep("X", 10), rep("Y",
10)))
useOuterStrips(xyplot(b ~ a | d + e, f,
scales = list(y = list(relation = "free", rot = 0),
x = list(alternating = F)),
aspect = 1.8, layout = c(2, 2),
axis = function(side, line.col = "black", ...){
if(side %in% c("left","bottom")) {
axis.default(side = side, line.col = "black", ...)
}
},
),
strip.left = F,
strip = strip.custom(style = 1, bg = "transparent",
factor.levels = c("This is centered", "Also"))
)
###
--
View this message in context: http://r.789695.n4.nabble.com/lattice-column-titles-using-xlab-top-in-multipanel-xyplot-tp4659610p4659990.html
Sent from the R help mailing list archive at Nabble.com.