Re: [R] Superscript/Subscript in main title

From: Christoph Meyer <christoph.meyer_at_uni-ulm.de>
Date: Wed, 04 Jun 2008 23:11:29 +0200

Hi Tariq,

try:

plot(x,y,main=expression("Emission of CO"[2]*" with time"))

Cheers,
Christoph

Wednesday, June 4, 2008, 10:31:08 PM, you wrote:

> I have been trying to figure out how to get superscript/subscript in the
> main title for a plot. I have tried various approaches and suggestions but
> none of them work. I am trying to get the following as the main title of my
> plot:

> Emission of CO2 with time

> (but note that 2 is subscript.)

> I have tried

> plot(main="Emission of C"expression(O[2]) "with time")

> and I get error message. I have also tried

> plot(main="Emission of C"quote(O[2]) "with time")

> I have also tried

> plot(main"")
> mtext("Emission of C"expression(O[2]) "with time")

> I keep getting errors. I have searched the archives but none of the threads
> seem to touch upon this. I would appreciate any suggestion. Regards,

> Tariq

> [[alternative HTML version deleted]]

> ______________________________________________
> R-help_at_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.



Dr. Christoph Meyer
Institute of Experimental Ecology
University of Ulm
Albert-Einstein-Allee 11
D-89069 Ulm
Germany
Phone:  ++49-(0)731-502-2675
Fax:    ++49-(0)731-502-2683
Mobile: ++49-(0)1577-156-7049

E-mail: christoph.meyer_at_uni-ulm.de
http://www.uni-ulm.de/nawi/nawi-bio3.html

R-help_at_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. Received on Wed 04 Jun 2008 - 21:49:08 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 04 Jun 2008 - 22:30:45 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive