[R] how to make some characters in the xlab of a plot to be superscripted or subscript?

Sundar Dorai-Raj sundar.dorai-raj at pdf.com
Thu Mar 9 12:49:45 CET 2006



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




More information about the R-help mailing list