[R] adding labels above bars in a barplot
Antonio Olinto
aolinto_r at bignet.com.br
Sat Sep 11 03:44:29 CEST 2010
Thanks Greg, Dennis and John for the attention and recommendations.
I did the job with
par(mar=c(12,6,3,2),cex.axis=1.2,cex.lab=1.4)
bp<-barplot(t(as.matrix(dat.bar)),ylim=c(0,max(dat.data[,2]*1.1)),las=2,ylab="Y
label text",col="orange")
box()
text(bp,dat.bar[,1],dat.data[,3],col="blue",pos=3)
More simple and too much better.
I will use the numbers on the top of the bars to indicate the number of
fishing boats per fleet (abscissa). Ordinate (y-axis) indicates
landings, so its information will not be replicated. Is this a sacrilege
anyway? Please forgive me … ;-)
Have a nice weekend.
Sincerely,
Antonio
Em 10-09-2010 14:44, Greg Snow escreveu:
> See this message and the replies to it (and the replies to the replies, etc.):
>
> http://tolstoy.newcastle.edu.au/R/e2/help/07/08/22858.html
>
> In there is a discussion of why you don't really want to do that along with better alternatives and examples of the improved plots.
>
>
More information about the R-help
mailing list