See the ?barplot arguments.
Some sample data:
transComp <- matrix(sample(3*36), nrow=3, ncol=36) colnamesbarplot <- as.character(1:36)
Barplotter:
barplot(transComp,space=c(0,2),legend.text=TRUE,beside=TRUE,horiz=TRUE, density=NA, col=c("red1","red4","green3"), xlab="crimes per 100,000 inhabitants", ylab="districts and years", axes=TRUE, names.arg=colnamesbarplot, cex.names=0.5, las=1)
Since you have many columns, you should set cex.names so that the labels are smaller. The las=1 argument rotates labels 90 degrees.
user1981275
source share