Jing Yang
2006-Mar-09 10:48 UTC
[R] how to make some characters in the xlab of a plot to be superscripted or subscript?
Dear R-users, I am trying to make my plot nicer. Does anyboby know how to make some characters in the xlab of a plot to be superscripted or subscript? ? for example "m3/s" in the x-axis label, how to make 3 supersripted? Best,Jing
Sundar Dorai-Raj
2006-Mar-09 11:49 UTC
[R] how to make some characters in the xlab of a plot to be superscripted or subscript?
Jing Yang wrote:> Dear R-users, > > I am trying to make my plot nicer. Does anyboby know how to make some characters in the xlab of a plot to be superscripted or subscript? ? > for example "m3/s" in the x-axis label, how to make 3 supersripted? > > Best,Jing > >See ?plotmath. plot(1:10, xlab = expression(m^3/5)) or plot(1:10, xlab = expression(over(m^3, 5))) HTH, --sundar
Petr Pikal
2006-Mar-09 11:58 UTC
[R] how to make some characters in the xlab of a plot to be superscripted or subscript?
Hi
see
?plotmath
# not tested
expression(paste("m^3, "/s"))
but I do not know how / is printed.
HTH
Petr
On 9 Mar 2006 at 11:48, Jing Yang wrote:
Date sent: Thu, 9 Mar 2006 11:48:45 +0100
From: "Jing Yang" <yangj at student.ethz.ch>
To: "r-help" <r-help at stat.math.ethz.ch>
Subject: [R] how to make some characters in the xlab of a plot to be
superscripted or subscript?
Send reply to: yangj at student.ethz.ch
<mailto:r-help-request at stat.math.ethz.ch?subject=unsubscribe>
<mailto:r-help-request at stat.math.ethz.ch?subject=subscribe>
> Dear R-users,
>
> I am trying to make my plot nicer. Does anyboby know how to make some
> characters in the xlab of a plot to be superscripted or subscript? ?
> for example "m3/s" in the x-axis label, how to make 3
supersripted?
>
> Best,Jing
>
>
Petr Pikal
petr.pikal at precheza.cz