Hello Rolf, Thank you for the response.
I tried your command but it did not work. plot(1:10,ylab="y",xlab=**expression(plain(km)^2)) Please kindly advise any other method to make "2" in km2 become a uppercase number. Thanks again. Elaine On Tue, Feb 21, 2012 at 8:24 AM, Rolf Turner <rolf.tur...@xtra.co.nz> wrote: > On 21/02/12 12:54, Elaine Kuo wrote: > >> Hello, >> >> This is Elaine. >> >> I am drawing a plot with x-axis label with "km square" as the unit. >> Now I want to print km square in the form of km2 and output "2" as the >> uppercase. >> Please kindly help suggest command to show the uppercase. >> > > 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 > [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.