Gabor Grothendieck wrote:
> 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)
> 
Indeed, the boxed.labels function makes this pretty easy.
boxed.labels(bp,x-0.2*diff(par("usr")[3:4]),x)

gives you the labels in a little white rectangle so that none are invisible.

I also greatly enjoyed Ted's rebuttal of the "Bar charts are evil and 
must be banned" argument. If bar charts are appropriate for the 
audience, give 'em bar charts. One great way to turn off your customers 
is to tell them what they can and can't do with your product.

Jim

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

Reply via email to