[R] barplot(): X-Axis Labels

Jess Balint jbalinc at insight.rr.com
Mon Oct 14 19:21:46 CEST 2002


On Mon, 14 Oct 2002 11:51:30 -0500
"Marc Schwartz" <mschwartz at medanalytics.com> wrote:

> labels <- paste("This is bar #", 1:16, sep ="")
> mp <- barplot(1:16, axes = FALSE, axisnames = FALSE)
> text(mp, par("usr")[3], labels = labels, srt = 45, adj = 1, xpd = TRUE)
> axis(2)
> 

Thank you all very much for your assistance. One more issue I do have is creating a label for the x-axis. If I specificy xlab = "" within the barplot(), it get overwritten by the category labels. I tried to add one below that with text( locator( 1 ), "x-axis label" ), but it seems that it won't insert the text below a certain threshold. Is there a way around this?
Thanks again.

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