Hi,
I created a xyplot with a three-column layout. As suggested by Deepayan I tried
to put titles to each column by using xlab.top. Unfortunately, as my y-axis
scale relation = "free", the column titles are not centered at the three x axes
anymore. Any idea how to center the titles?
#Example:
require(lattice)
#require(latticeExtra)
e <- data.frame(a = c(1:30), b = c(1:10, 20:29, 990:999),
d = c(rep("A", 10), rep("B", 10), rep("C", 10)))
#column titles centered for relation = "same"
xyplot(b ~ a | d, e,
scales = list(y = list(relation = "same", rot = 0)),
aspect = 1.8, layout = c(3, 1),
xlab.top = c("This is centered", "Bla", "Bla")
)
#column titles not centered for relation = "free"
xyplot(b ~ a | d, e,
scales = list(y = list(relation = "free", rot = 0)),
aspect = 1.8, layout = c(3, 1),
xlab.top = c("This is not centered", "Bla", "Bla")
)
# end of example
Best regards,
manuel
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.