Skip to content
Prev 727 / 7420 Next

labelling graph axes: sub/superscript

On Tue, 2009-07-28 at 13:39 +0100, Crowe, Andrew wrote:
Thanks for pointing that out Andrew, an oversight on my part.

The reason I missed it was that Rebecca was using (and repeated by
yourself above) a very convoluted way of expressing the axis label. As I
showed, none of this needs to be quoted with "", and all the "*" seem to
me to just confuse the matter. Also, note that Rebecca's code (and the
above) doesn't produce a \mu (micro symbol), where as the code in my
posting did.

Here is my suggestion again, this time rectifying the omitted
subscripting on NET.

dat <- data.frame(x = rnorm(100), y = rnorm(100))
plot(y ~ x, data = dat,
     ylab = expression(italic(A[NET]) ~ (mu * mol ~ m^{-2} * s^{-1})))

To my mind, the above label is much simpler and cleaner than using all
the "" and *, yet yields the same thing (except the mu/u difference).

HTH

G