Skip to content
Prev 21107 / 398498 Next

barplot

----- Original Message -----
From: <alexander.schnee at tuebingen.mpg.de>
To: <r-help at stat.math.ethz.ch>
Sent: Tuesday, June 25, 2002 1:33 AM
Subject: [R] barplot
Perhaps try the barplot() function that already exist in R?

It already allows you to set the axis limt (ylim and xlim).
Again, it shouldn't happen.  The codes below are directly extracted from the
barplot() documentation:

data(VADeaths, package = "base")
hh <- t(VADeaths)[, 5:1]
mybarcol <- "gray20"
mp <- barplot(hh, beside = TRUE,
              col = c("lightblue", "mistyrose",
                "lightcyan", "lavender"),
              legend = colnames(VADeaths), ylim= c(0,100),
              main = "Death Rates in Virginia", font.main = 4,
              sub = "Faked upper 2*sigma error bars", col.sub = mybarcol,
              cex.names = 1.5)

It works.  Try changing the "ylim = c(0, 100)" to other limits, it still
works!

Cheers,

Ko-Kang Wang


------------------------------------------------
Ko-Kang Kevin Wang
Post Graduate PGDipSci Student
Department of Statistics
University of Auckland
New Zealand

www.stat.auckand.ac.nz/~kwan022


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