[R] bars' values on barplot

Greg Snow Greg.Snow at intermountainmail.org
Mon Aug 6 18:59:32 CEST 2007


Why do you feel the need to add the numbers to your barplot?

Occasionally this can be useful (and others have answered the question
on how to do it), but often when you feel the need to add numbers to a
graph you are really doing 2 things:

1. admitting the graph has failed
2. replacing the graph with a poorly laid out table (with a colorful but
distracting background).

If this is the case, then replacing the graph with a proper table is
probably the better option.

Just a couple of things to think about,

-- 
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.snow at intermountainmail.org
(801) 408-8111
 
 

> -----Original Message-----
> From: r-help-bounces at stat.math.ethz.ch 
> [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of akki
> Sent: Saturday, August 04, 2007 4:44 PM
> To: r-help at stat.math.ethz.ch
> Subject: [R] bars' values on barplot
> 
> Hi,
> I need bars' values on barplot, and I don't know how I can 
> put it. I do my barplot as:
> 
> data<-read.table("/my_path/file.dat",header=T, sep="\t") 
> barplot(as.matrix(data),log="y",beside=TRUE,main="my_title", 
> xlab="x name", ylab="y name").
> 
> How can I add the values on each bar?
> 
> Thanks..
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at stat.math.ethz.ch 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.
>



More information about the R-help mailing list