Reputation: 6190
Probably a trivial question but nevertheless I couldn't find a straightforward answer for it online.
Suppose I plot this data:
plot(c(1:10),rnorm(10),xaxt="n",xlab="")
And then I want to plot my own defined x-axis labels:
x.labs=c("a","b","c","d","e","f","g","h","i","j")
axis(1,at=c(1:10),labels=x.labs)
My question is how do I adjust the font size of the labels (make x.labs
bigger or smaller)?
Upvotes: 2
Views: 12985
Reputation: 7895
You can use cex.axis
:
plot(c(1:10), rnorm(10), xaxt = "n", xlab = "")
x.labs = letters[1:10]
axis(1, at = c(1:10), labels = x.labs, cex.axis = 1.5)
Upvotes: 4