[19013] 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 15:04:52 1999

Message-Id: <199908231857.NAA07468@wubios.wustl.edu>
Date: Mon, 23 Aug 1999 14:57:16 -0400
From: "Gunter, Bert" <bert_gunter@merck.com>
To: "'James Lymp'" <lymp@u.washington.edu>
Cc: S-news@wubios.wustl.edu
Mime-Version: 1.0
Content-Type: text/plain
Content-Transfer-Encoding: 7BIT


I am sorry, but the solution below is NOT close. If x and y have much
different ranges, the code below will make the ranges on each axis the same,
and therefore leave the aspect ratio of the data as it is conventionally
defined far from 1.

-- Bert Gunter
Merck & Co.

> ----------
> From: 	James Lymp[SMTP:lymp@u.washington.edu]
> Sent: 	Monday, August 23, 1999 2:41 PM
> To: 	Prof Brian D Ripley
> Cc: 	S-news@wubios.wustl.edu
> Subject: 	Re: [S] Aspect Ratio in Plots
> 
> 
> All right. Enough already. Prof Brian D Ripley and Gunter, Bert have not
> so
> subtly pointed out that my solution was "wrong". My solution was
> approximate. It is a lot closer than where the original poster started.
> Peter Perkins kindly suggested adding par(pty="s") which helps a lot. On
> my
> Windows 95 - based machine running verson 4.5, the following commands get
> the aspect ratio to within 5% if not 1% of each other. My rudimentary
> measuring system (lined paper on the screen and printout) is no more
> accurate than that. Also, my appologies to C programmers that are unaware
> that the underscore (_) is the same as <- for many versions of S-PLUS.
> Please tell me I am not the first person to use the underscore!
> 
> ####
> graphsheet(8,8)
> par(pty="s")
> pd <- range(c(x,y),na.rm=T)
> 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
> 
-----------------------------------------------------------------------
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