From p.dalgaard@biostat.ku.dk  Mon Nov 15 21:39:20 1999
From: p.dalgaard@biostat.ku.dk (Peter Dalgaard BSA)
Date: 15 Nov 1999 22:39:20 +0100
Subject: xlim, ylim problem in barplot (PR#325)
In-Reply-To: mcw@ln.nimh.nih.gov's message of "Mon, 15 Nov 1999 22:08:06 +0100 (MET)"
References: <199911152108.WAA09550@pubhealth.ku.dk>
Message-ID: <x2hfinh1tj.fsf@blueberry.kubism.ku.dk>

mcw@ln.nimh.nih.gov writes:

> Hi, all.
> 
> The lower bound in a barplot (or the left bound if you're making a
> horizontal barplot) is -0.01 no matter what.  This causes problems if
> you're making a barplot of small values (say, < .001), as most of the plot
> is taken up with blank space beneath the axis, and the bars are squeezed
> in at the top.  The fix seems to be simple: replace lines
> 
> 41:      xlim <- range(-0.01, height) 
> 59:      ylim <- range(-0.01, height)
> 
> by the following:
> 
> 41:      xlim <- range(max(-0.01, -0.01 * height), height) 
> 59:      ylim <- range(max(-0.01, -0.01 * height), height)
> 
> This seems to work for small negative numbers as well.

or simply range(-0.01*height,height) 

That one might just be sneaked into the upcoming release....

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk)             FAX: (+45) 35327907
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


xlim, ylim problem in barplot (PR#325)
Peter Dalgaard BSA