[R] Optimisation of xyplot style

From: Sébastien <pomchip_at_free.fr>
Date: Fri, 27 Jun 2008 09:48:26 -0400


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



R-help_at_r-project.org 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. Received on Fri 27 Jun 2008 - 13:56:36 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 27 Jun 2008 - 14:31:35 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive