Re: [R] superscript in figures - basic question

From: Martin Maechler <maechler_at_stat.math.ethz.ch>
Date: Tue 14 Jun 2005 - 17:26:18 EST

>>>>> "Peter" == Peter Alspach <PAlspach@hortresearch.co.nz>
>>>>> on Tue, 14 Jun 2005 14:11:47 +1200 writes:

    Peter> Ben

    Peter> Others have pointed out plotmath.  However, for some
    Peter> superscripts (including 2) it may be easier to use
    Peter> the appropriate escape sequence (at in Windows):

    Peter> ylab = 'BA (m\262/ha)'

but please refrain from doing that way.
You should write R code that is portable, and ``plotmath'' has been designed to be portable. Windows escape codes are not,
and may not even work in future (or current?) versions of Windows with `unusual' locale settings {fonts, etc}.

Martin Maechler

    Peter> Cheers ........

    Peter> Peter Alspach

    >>>> "Benjamin M. Osborne" <Benjamin.Osborne@uvm.edu>     >>>> 14/06/05 13:42:53 >>>

    Peter> Although I see similar, but more complex, questions
    Peter> addressed in the help archive, I'm having trouble
    Peter> adding superscripted text to the y-axis labels of
    Peter> some figures, and I can't find anything in the R
    Peter> documentation on this.

    Peter> I have:

    Peter> ylab="BA (m2/ha)"

    Peter> but I want the "2" to be superscripted.  Thanks in
    Peter> advence for the help, or for pointing out the
    Peter> appropriate help file.

    Peter> -Ben Osborne

    Peter> ______________________________________________
    Peter> R-help@stat.math.ethz.ch mailing list
    Peter> https://stat.ethz.ch/mailman/listinfo/r-help PLEASE
    Peter> do read the posting guide!
    Peter> http://www.R-project.org/posting-guide.html
    Peter> ______________________________________________________

    Peter> The contents of this e-mail are privileged and/or     Peter> confidenti...{{dropped}}

    Peter> ______________________________________________
    Peter> R-help@stat.math.ethz.ch mailing list
    Peter> https://stat.ethz.ch/mailman/listinfo/r-help PLEASE
    Peter> do read the posting guide!
    Peter> http://www.R-project.org/posting-guide.html

R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Tue Jun 14 17:30:16 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:32:33 EST