[R] Subject: Re: how to include bar values in a barplot?
Gabor Grothendieck
ggrothendieck at gmail.com
Thu Aug 9 14:55:04 CEST 2007
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 <f.harrell at vanderbilt.edu> wrote:
> Ted.Harding at manchester.ac.uk 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 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