Probably, you have to manually create, but it is easy: # for beside=F mp <- barplot(VADeaths) text(mp,y<-t(apply(VADeaths,2,cumsum)),y) # labels are values itself # or mp <- barplot(VADeaths) text(mp,t(apply(VADeaths,2,cumsum)),VADeaths) # labels are cumsum of values
# for besides=T mp <- barplot(VADeaths,beside=T) text(mp,VADeaths,VADeaths) ## maybe some adjustment is required for y position, then, for example, mp <- barplot(VADeaths,beside=T) text(mp,VADeaths+3,VADeaths) HTH On 1/18/07, Justin Gengler <[EMAIL PROTECTED]> wrote: > Hello all, > > When using the 'barplot' function, how would one go about creating > labels on the top of the bars corresponding to the actual frequency > values (i.e., the height of the bar). For histograms, one can use > the 'LABEL=T' parameter to this effect, but it is not available for > barplot. Must one manually create such labels for a barplot (perhaps > using mtext)? > > Thanks. > > Justin Gengler > > ______________________________________________ > [email protected] 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. > ______________________________________________ [email protected] 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.
