[18897] in s-news-athena
[S] Re: setting pairs/splom axes in S-plus
daemon@ATHENA.MIT.EDU (Lynn Gale)
Mon Aug 9 19:19:04 1999
Message-Id: <199908092313.QAA08047@casbs.Stanford.EDU>
To: s-news@wubios.wustl.edu
Date: Mon, 09 Aug 1999 16:13:51 -0700
From: Lynn Gale <lynn@casbs.stanford.edu>
Thanks to Steve McKinney <kilroy@enterprise.pulmcc.washington.edu> for
offering the trick that made this work, namely, add fake points to the
variables but then avoid plotting them in the following manner.
Note: this approach did NOT work for "splom" but it works for
"pairs" in my version of S-Plus.
In the example, there are 6 variables all measured on the same scale,
so I want the scatterplot matrix axes all the same, and square plots
(pty="s"), not rectangular.
> dim(data.foo)
[1] 159 6
> foo.min <- floor(min(data.foo))
> foo.max <- ceiling(max(data.foo))
> foo.bar <- rbind(rep(foo.min,ncol(data.foo)),
+ rep(foo.max,ncol(data.foo)),data.foo)
> dim(foo.bar)
[1] 161 6
> par(pty="s")
> pairs(foo.bar,panel=function(x,y)
+ { points(x[-c(1,2)],y[-c(1,2)]) })
------- Original query
>
> Date: Wed, 04 Aug 1999 15:47:29 -0700
> From: Lynn Gale <lynn@casbs.Stanford.EDU>
>
>
> How does one specify identical axes in either "pairs" or "splom"?
> If someone has figured this out already, it would sure save me a lot
> of time... I've already spent more than a day on it.
>
> Neither function will accept xlim, ylim parameters. All I want is a
> scatterplot matrix with all the x and y axes the same. (Do I need to
> throw in some fake points to force the ranges to coincide on all the
> variables?!) It doesn't seem an unusual situation, to require
> identically scaled axes. I've tried using panel, pscale, and various
> other things, but to no avail. Maybe my commands have been in error or
> maybe there is a bug? Thanks for any solutions *or* thanks for
> confirming just that "it can't be done" in straightforward manner in
> this particular version.
>
> I'm using Version 3.4 Release 1 for Sun SPARC, SunOS 4.1.3 UNIX
>
> - Lynn
>
>
------- End of Forwarded Message
-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news