Re: scatter.acm() & par(mfrow = c(x,y))

From: Daniel Chessel (chessel@biomserv.univ-lyon1.fr)
Date: Sat Jun 11 2005 - 15:56:32 MEST

  • Next message: Vanessa J.Smith: "x----SPAM----x Adobe Acrobat 6.0 - wholesale pric"

    Ivailo Stoyanov a écrit
    > i wonder how to force the function scatter.acm() to honour a previous
    > call of par(mfrow = c(x,y)).

    You can use this version :

    "scatter.acm" <- function (x, xax = 1, yax = 2, mfrow=NULL, csub = 2, possub = "topleft",
    ...) {
         if (!inherits(x, "acm"))
             stop("For 'acm' object")
         if (x$nf == 1) {
             score.(x, 1)
             return(invisible())
         }
         def.par <- par(no.readonly = TRUE)
         on.exit(par(def.par))
         oritab <- eval(as.list(x$call)[[2]], sys.frame(0))
         nvar <- ncol(oritab)
         # modif samedi, juin 11, 2005 at 15:38
         # message de Ivailo Stoyanov istoyanov@ecolab.bas.bg
         if (is.null(mfrow)) mfrow = n2mfrow(nvar)
         old.par <- par(no.readonly = TRUE)
         on.exit(par(old.par))
         par(mfrow = mfrow)
         if (prod(mfrow)<nvar) par(ask=T)
         # modif lundi, décembre 16, 2002 at 16:48
         # suite à message d'Alain Guerreau
         for (i in 1:(nvar)) s.class(x$li, oritab[, i], xax=xax, yax=yax, clab = 1.5,
             sub = names(oritab)[i], csub = csub, possub = possub,
             cgrid = 0, csta = 0, ...)
    }

    A good idea to be kept in the next update
    thanks



    This archive was generated by hypermail 2b30 : Sat Jun 11 2005 - 15:57:42 MEST