[R] plot ᵒ C in graph axis label

e-letter inpost at gmail.com
Fri Oct 2 08:49:43 CEST 2009


I have tried to use a plotmath command to add the temperature degree
sign (i.e. ᵒ C) to the axis label of a graph:

> x<-(1:10)
> y<-(200:191)
> plot(x~y,ylab=expression(*degree~C))
Error: syntax error, unexpected '*', expecting ',' in

According to plotmath manual, the syntax is '*degree' and I am able to
use this command when a number precedes the asterisk (e.g.
ylab=expression(0*degree~C)). But I want to omit the need for a number
before the degree sign. Any advice please?

More information about the R-help mailing list