[R] Optimisation of xyplot style
Sébastien
pomchip at free.fr
Fri Jun 27 15:48:26 CEST 2008
Dear R-users,
The following provides a basis to illustrate some questions I have about
xyplot() customization.
x <- rep(1:2, times = 6)
y <- numeric()
for (i in 1:3) {
y <- c(y, 1:4*10^(i-1))
}
g <- rep(1:6, each = 2)
ax <- rep(1:3, each = 4)
tmp <- data.frame(x,y,g)
xyplot(y ~ x | g,
as.table = TRUE,
strip = function (which.panel, ...){
llines(c(0, 1, 1, 0, 0), c(0, 0, 1, 1, 0), col.line = 1)
ltext(rep(0.5, 6), rep(0.5, 6),
paste("g", which.panel, sep = " "))},
layout = c(2,3))
What I could not find in the list or in the help (I probably did not
search at the right place...) is:
- how can I force xyplot to plot the axis ticks and labels always at the
bottom (x-axis) and left (y-axis) ?
- is it possible to have different xlim for each row without using
relation = "free" in the scales argument ? I would like to keep my plot
as a single block of panels but need to have different axis ranges (see
how panels 1 and 2 are crushed)
- is it possible to have a (different?) axis title for each row or
column of panels?
Thank you in advance.
Sebastien
More information about the R-help
mailing list