Skip to content

how to print km square in the form of km2

2 messages · Elaine Kuo, Rolf Turner

#
On 21/02/12 12:54, Elaine Kuo wrote:
When you say "as [the] uppercase" I *think* you mean "as a
superscript".  Assuming that I am correct in my supposition,
you can achieve what you want via the syntax shown in the
following example:

     plot(1:10,ylab="y",xlab=expression(plain(km)^2))

For details on how you do this sort of thing in general see:

     ?plotmath

Be warned --- it's tricky!  I find that I always need to experiment
quite a lot before I get it right.  Experimentation is cheap, but.

HTH

     cheers,

         Rolf Turner