Q: Cleaning up a barplot in R Hello friendly computer people,
I'm new to R and am getting a bit lost in the vast world of setting plot parameters. Currently I have a barplot that looks like this. My main issue is cleaning up the graph so that each bar is associated with a category. Right now the fonts are set so they overlap and don't show all the categories.
In other words, I would like to:


*

*Have the bar names read horizontally.

*Set the font paramaters so that each category is shown i.e. each bar has a name. Maybe this involves shrinking the font size?


Any help on this matter would be greatly appreciated!
Thank you :)

A: EDIT: Very good suggestion of ucfagls included. Thx!
See the options las in ?par and cex.names in ?barplot :
# Sample dataset
x <- rpois(10,20)
names(x) <- replicate(10,
   paste(sample(LETTERS[1:10],10),collapse="")
)

# Demonstration of the options
op <- par(mar = c(5,6,4,2) + 0.1)
barplot(x,horiz=T,las=1,cex.names=0.5)
par(op)

Gives :

So adjust your own code using the options las and cex.names. Also check the option mar in the help page ?par to know how you could adjust the values in case your labels fall off.
