rotating axis labels in R

Z O. picture Z O. · Dec 1, 2009 · Viewed 301.7k times · Source

In R, how do I make a (bar)plot's y axis labels parallel to the X axis instead of parallel to the Y axis?

Answer

Shane picture Shane · Dec 1, 2009

Not sure if this is what you mean, but try setting las=1. Here's an example:

require(grDevices)
tN <- table(Ni <- stats::rpois(100, lambda=5))
r <- barplot(tN, col=rainbow(20), las=1)

output

That represents the style of axis labels. (0=parallel, 1=all horizontal, 2=all perpendicular to axis, 3=all vertical)