[R] Degree symbol as axis label superscript [RESOLVED]

Rich Shepard r@hep@rd @end|ng |rom @pp|-eco@y@@com
Tue Nov 30 21:29:44 CET 2021


On Tue, 30 Nov 2021, Rich Shepard wrote:

> Thanks, Andrew. I will.

plotmath didn't have the solution; the use of the LaTeX ^ for a superscript
had a character or number preceeding it. Using 'degree' prints that string
on the axis.

What does work is using the unicode for the degree symbol as prefix to
either C or F. In my case:
 	ylab('Water Temperature (\u00B0C)')
does the job.

I found this solution with the DDG search string, 'degree symbol in R plot
axis label'. This stackexchange thread has the answer:
<https://stackoverflow.com/questions/51799118/writing-the-symbol-degrees-celsius-in-axis-titles-with-r-plotly>

Regards,

Rich



More information about the R-help mailing list