Hi,
Thanks for all of your replies!
David, a slightly modified version of what you gave did the trick:
hist(X,main = expression("["*Ca**""^paste(2,"+")*"]i"~'onsets'))
But I prefer the way '2+' is italicized in the solution Dennis gave:
hist(X, main = bquote('[Ca'^'2+'*']i'~'onsets'), xlab = 'sec')
I think I understand it now - the '^' symbol must be followed by the '*'
symbol to signify the end of font italicization; and '~' must be used to
signify spaces. The only thing I still don't get is why square brackets
rather than quotation marks surround the 'i' in the solution Claudia gave:
hist(X, main=expression("[" * Ca^"2+" * "]" [i]~'onsets'), xlab = 'sec')
--
View this message in context:
http://r.789695.n4.nabble.com/superscript-characters-in-title-with-tp3006981p3007188.html
Sent from the R help mailing list archive at Nabble.com.
______________________________________________
[email protected] 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.