Hello, Thanks for the suggestion below. I did one of my figures and it worked perfectly. I tried it on my second figure and got double-labelling on the first bar. I used the same code to create both figures, and the same code to label. I've attached the code for one of the plots (there were 3/figure) if anyone has a chance to figure out why.
Thanks, Suzanne Philipp Pagel <[EMAIL PROTECTED]> wrote: > Hi! > >On Fri, Nov 07, 2003 at 10:46:27AM -0500, Suzanne E. Blatt wrote: >> Can anyone tell me how to label individual bars on a barplot? I want >> to put an "*" or letter ABOVE the bar to denote statistical >> significance. Is this possible and how? > >You can use text() to put arbitrary strings in your plot. So you only >need to add some offset to your y-values and work out the x-positions: > >y <- c(10,12,15,8) >lab <- c('*','**','***','*') >barplot(y, ylim=c(0,20), space=0.5) >x <- (0:3*0.5)+1:4 >text(x, y+1, lab, adj=0.5) > >cu > Philipp > >-- >Dr. Philipp Pagel Tel. +49-89-3187-3675 >Institute for Bioinformatics / MIPS Fax. +49-89-3187-3585 >GSF - National Research Center for Environment and Health >Ingolstaedter Landstrasse 1 >85764 Neuherberg, Germany > >______________________________________________ >[EMAIL PROTECTED] mailing list >https://www.stat.math.ethz.ch/mailman/listinfo/r-help > __________________________________________________________________ McAfee VirusScan Online from the Netscape Network. Comprehensive protection for your entire computer. Get your free trial today! http://channels.netscape.com/ns/computing/mcafee/index.jsp?promo=393397 Get AOL Instant Messenger 5.1 free of charge. Download Now!
______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help