Skip to content

How to assign height value on bar plot?

5 messages · Manish Gupta, Uwe Ligges, Jim Lemon +1 more

#
On 26.05.2012 18:07, Manish Gupta wrote:
See ?barplot.

Uwe Ligges
#
On 05/27/2012 04:30 AM, Manish Gupta wrote:
Hi Manish,
If don't have stacked bars, it is fairly simple:

barpos<-barplot(height,...)
text(barpos,height,labels=height)

usually with a bit of fooling around with the cex argument. If you want 
each value in a little box, try boxed.labels in plotrix.

Jim
#
Did you look at the help page that Uwe directed you to?  At least one
of the examples on that page demonstrates adding text to a barplot.
But before you do that you should read through the discussion here:
http://tolstoy.newcastle.edu.au/R/e2/help/07/08/22858.html on why you
might not want to add text to the top of the bars and some of the
alternatives.

On Sat, May 26, 2012 at 12:30 PM, Manish Gupta
<mandecent.gupta at gmail.com> wrote: