[R] Y-limits of barplots

Uli Flenker; Raum 704 uli at biochem.dshs-koeln.de
Thu Mar 25 13:43:01 CET 1999


Hello everybody,

I frequently have to produce barplots from variables the natural variation
of which is far away from zero. A typical range would be, say from -16 to
-28.

So, the following example should give an "honest" presentation:

x<-c(-20,-22,-21,-28)
barplot(x,beside=T,ylim=c(-18,-30))

But using anything else but "0" for the first element of ylim
leads to strange results, as the bars "ignore" the X-axis and keep on
extending to zero. (R 0.63.2, Linux 2.0.25)

Any idea how to avoid this behaviour (without doing a rewrite of
"barplot")?


        Uli Flenker
        Institut fuer Biochemie
        Deutsche Sporthochschule Koeln
        Carl-Diem-Weg 6

        50933 Koeln

        Tel.: D/0221/4982-493
                         -494

 



-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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