How to make the square root symbol in axes labels?
16,516
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
Author by
user1730122
Updated on June 25, 2022Comments
-
user1730122 about 2 years
How can I make the square root symbol to appear ceiling an axis label in R?
-
mnel over 11 years+1. There is no need to look online for the help.
?plotmath
will give the same help page -
IRTFM over 11 yearsI'm downvoting (the question, not the answer) because @user1730122 crossposted to r-help.