Re: [R] label each bar by value

From: John Kane <jrkrideau_at_yahoo.ca>
Date: Thu, 13 Mar 2008 13:37:09 -0400 (EDT)


?text

tmp <- c(34,22,77)
tmp.labels <- c("cat", "dog", "sheep")
tmp2 <- barplot(tmp, ylim=c(0, max(tmp)+10)) text(1:3, tmp+2 , labels=tmp.labels)

> I want to label each bar on the top of bars when
> using barplot.
>
> anyone know how to do this?
>
> thanks
>
> ______________________________________________
> R-help_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained,
> reproducible code.
>



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Thu 13 Mar 2008 - 17:39:48 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 13 Mar 2008 - 18:30:21 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive