Gabor, Putting the numbers in the bars is an improvement over putting them over the bars, but if the numbers are large relative to the bars, this could still create a "fuzzy" top to the bars making them harder to compare. This also has the problem of the poorly laid out table, numbers are easiest to compare if they are aligned (and vertical comparisons are easier than horizontal).
There is also the issue of scale. You can shrink a barplot quite a bit and still get a good overview of the relationships, but if you need the numbers inside the plot, then either the numbers become to small to easily read, or the numbers stay big and overwhelm the plot. The best approach is to switch to a dotplot with the numbers in the margin (Frank has suggested this as well). If you need to stay with the bar plot (some lay people are still more comfortable with them until we can educate them to prefer the dot plots) then I would suggest doing horizontal bars with the numbers in the margin (vertically aligned). If the vertical bars are necessary, then putting the numbers below the bars (but separated enough that they don't interfere with a clear zero point) seems the safest approach. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare [EMAIL PROTECTED] (801) 408-8111 > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Gabor > Grothendieck > Sent: Thursday, August 09, 2007 6:55 AM > To: Frank E Harrell Jr > Cc: r-help@stat.math.ethz.ch; [EMAIL PROTECTED] > Subject: Re: [R] Subject: Re: how to include bar values in a barplot? > > You could put the numbers inside the bars in which case it > would not add to the height of the bar: > > x <- 1:5 > names(x) <- letters[1:5] > bp <- barplot(x) > text(bp, x - .02 * diff(par("usr")[3:4]), x) > > On 8/9/07, Frank E Harrell Jr <[EMAIL PROTECTED]> wrote: > > [EMAIL PROTECTED] wrote: > > > Greg, I'm going to join issue with your here! Not that > I'll go near > > > advocating "Excel-style" graphics (abominable, and the > Patrick Burns > > > URL which you cite is remarkable in its restraint). Also, > I'm aware > > > that this is potential flame-war territory -- again, I want to > > > avoid that too. > > > > > > However, this is the second time you have intervened on > this theme > > > (previously Mon 6 August), along with John Kane on Wed 1 > August and > > > again today on similar lines, and I think it's time an > alternative > > > point of view was presented, to counteract (I hope usefully) what > > > seems to be a draconianly prescriptive approach to the > presentation > > > of information. > > > > > > ---snip--- > > > > Ted, > > > > You make many excellent points and provide much food for > thought. I > > still think that Greg's points are valid too, and in this > particular > > case, bar plots are a bad choice and adding numbers at variable > > heights causes a perception error as I wrote previously. > > > > Thanks for your elaboration on this important subject. > > > > Frank > > > > > > > > On 07-Aug-07 21:37:50, Greg Snow wrote: > > >> Generally adding the numbers to a graph accomplishes 2 things: > > >> > > >> 1) it acts as an admission that your graph is a failure > > > > > > Generally, I disagree. Different elements in a display serve > > > different purposes, according to the psychological > aspects of visual preception. > > > > . . . > > > > -- > > Frank E Harrell Jr Professor and Chair School > of Medicine > > Department of Biostatistics > Vanderbilt University > > > > ______________________________________________ > > R-help@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. > > > > ______________________________________________ > R-help@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. > ______________________________________________ R-help@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.