How to make the square root symbol in axes labels?

user1730122 picture user1730122 · Oct 9, 2012 · Viewed 15k times · Source

How can I make the square root symbol to appear ceiling an axis label in R?

Answer

Jilber Urbina picture Jilber Urbina · Oct 9, 2012

Use expression(sqrt(x)), see the help file (by doing ?plotmath as mentioned in mnel's comment) for mathematical annotations in R plots.

plot(1:10,
     main='Example',
     ylab=expression(sqrt(x)))

which produces

enter image description here