[R] barplots - text direction

Murray Pung Murraypu at aimnsw.com.au
Wed Aug 24 03:27:20 CEST 2005


If the variable names are too long to allow room for each to be displayed on a barplot, how can the direction of the text be changed?

a <- cbind(2.4,2.4,2.5,2.6,2.6,2.6,2.6,2.6,2.9,2.9,2.9)
b <- cbind(2.3,2.5,2.4,2.2,3.2,2.4,2.9,2.6,2.9,3.0,2.8)
h <- rbind(a,b)
colnames(h) <- c("one","two","three","four","five","six","seven","eight","nine","ten","eleven")
rownames(h) <- c("Pre-stage","Post-stage")
barplot(h, beside = T, legend = colnames(g), horiz = T, xlim = c(0, 5))


Many Thanks
Murray

Murray Pung | Research Analyst
AIM Research & HR Consulting
PO Box 328, Nth Sydney NSW 2060
P +61 (02) 9956 3951
F +61 (02) 9922 2210
www.aimsurveys.com.au




More information about the R-help mailing list