[R] plot ᵒ C in graph axis label

e-letter
Fri, 02 Oct 2009 06:49:43 -0000

Readers,

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
"plot(x~y,ylab=expression(*"

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?