1

I want my x label to be: Latitudinal extent(0), with the zero inside the brackets superscript (i.e. the degrees symbol). I can't find a way of doing it.

Currently, this works:

xlab(expression(Latitudinal~extent~(.^0~.)))

but then I need to erase the extra dots using Paint (or something similar).

Dvyn Resh
  • 980
  • 1
  • 6
  • 14
  • See also: https://stackoverflow.com/questions/17391903/superscript-oc-in-ylab-in-ggplot or https://stackoverflow.com/questions/52404248/r-how-to-get-superscript-in-text-with-a-bracket-before-the-superscript – kath Aug 13 '19 at 07:19

1 Answers1

1

If you want the degree symbol, why don't you use the degree symbol?

plot(1, xlab = expression("Latitudinal extent"~(degree)))

A superscript zero is possible but doesn't look good:

plot(1, xlab = expression("Latitudinal extent"~({}^0)))

You might want to study help("plotmath").

Roland
  • 127,288
  • 10
  • 191
  • 288