[19011] in s-news-athena

home help back first fref pref prev next nref lref last post

RE: [S] Aspect Ratio in Plots

daemon@ATHENA.MIT.EDU (Gunter, Bert)
Mon Aug 23 14:32:57 1999

Message-Id: <199908231825.NAA01278@wubios.wustl.edu>
Date: Mon, 23 Aug 1999 14:25:11 -0400
From: "Gunter, Bert" <bert_gunter@merck.com>
To: S-news@wubios.wustl.edu, "Jason G. Cummins" <jason.cummins@nyu.edu>,
        "'James Lymp'" <lymp@u.washington.edu>
Mime-Version: 1.0
Content-Type: text/plain
Content-Transfer-Encoding: 7BIT


The "solution" below from James Lymp is wrong! Aspect ratio is defined (by
Bill Cleveland, anyway, in his books) as the ratio of the actual physical
height to the width of the data rectangle -- a rectangle just enclosing the
data in the plot. The code below does not control the aspect ratio, only the
scaling on the axes. Brian Ripley's eqscplot will do it. I believe setting
par(pty="s") and setting the xaxs and yaxs option to "i" will also, at least
in Windows (SPlus gurus, please let all know if I am wrong about this).

It is also well worth reading Cleveland's ideas on "banking to 45 degrees"
in VISUALIZING DATA or THE ELEMENTS OF GRAPHING DATA to determine exactly
what aspect ratio may be desirable. In general, controlling the aspect ratio
requires simultaneously controlling axis physical dimensions AND the scaling
of the data on the axes.

-- Bert Gunter
Merck& Co.


> It seems unfair to the software developers to say that the practice of
> displaying scatterplots according to the range of the data is deceptive
> when
> the axes are clearly labeled and when the X and Y variables usually don't
> have the same units anyway. Imagine plotting income in US dollars vs. age
> in
> years, for example. That said, I agree that in your case it would be
> desirable to have the domains of the same length. One way to do this is
> outlined below (pretend the variables are in two vectors called x and y).
> 
> pd_range(c(x,y),na.rm=T) ### plot domain
> plot(x,y,xlim=pd,ylim=pd)
> 
> -----
> James Lymp
> http://staff.washington.edu/lymp
> lymp@u.washington.edu
> -----
> 
-----------------------------------------------------------------------
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

home help back first fref pref prev next nref lref last post