[R] barplot axes

Peter Dalgaard BSA p.dalgaard at biostat.ku.dk
Thu Jan 6 10:30:23 CET 2000


karen at gecko.biol.wits.ac.za writes:

> Setting ylim=c(0,..) has the strange effect of removing the 0 from the
> axis and changing the interval between tick marks without necessarily
> making the axis extend to the upper value specified. It seems it is not
> possible to make the axis start at 0 when using ylim.
> 
> I see that it's not yet possible to set yaxs = "s" or "e", which I thought
> might help. Am I missing something? 

A bugfix... axes with yaxs="i" doesn't include the endpoints. They do
in S+ and really should do it in R too. The easiest workaround is
along the lines of

  barplot(1:10,ylim=c(-.01,14.01))

(ylim does actually work for setting the plot area. Try adding a box()
to see it).

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help 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-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list