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

From: Ivailo Stoyanov (istoyanov@ecolab.bas.bg)
Date: Mon Jun 13 2005 - 17:42:34 MEST


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Daniel Chessel wrote:
> 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
>
>

Dear Daniel,

thank you for the quick and helpful response!!!

I'll try the modified version to control for the desired layout:)

Greets,
Ivailo
- --
 If you're not on the edge, you're taking up too much space.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFCralqRTVtSNGyU8kRApywAJ4qNiJsYwhziLMMXBDh1yfifGaBUgCglFe7
QDffDGaufP5/RDZUpwH/rQw=
=jEWo
-----END PGP SIGNATURE-----



This archive was generated by hypermail 2b30 : Tue Oct 18 2005 - 10:35:40 MEST