[R] Aligning labels to bars in barplot

David Arnold dwarnold45 at suddenlink.net
Wed Jan 16 09:48:14 CET 2013


Hi,

Consider:

x=c(2,4,5,10,13,73)
names(x)=c("American\nIndian",
           "No\ncategory\nlisted",
           "Hispanic",
           "African-\nAmerican",
           "Asian",
           "White")
barplot(x,main="Undergraduate Enrollment by Race",
        xlab="Race",
        ylab="Percent",
        col=rainbow(6))

The labels at the bottom of the bars are aligned at the bottom of the last
word in each bar label. How can I code it so that the labels are aligned at
the top of the first word in each bar label?

Thanks,

David.



--
View this message in context: http://r.789695.n4.nabble.com/Aligning-labels-to-bars-in-barplot-tp4655701.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list