I would like to produce, as graphical annotation, the Greek letter sigma with a superscript of 2 and a subcript of 11. (I.e. the top left hand entry of a covariance matrix.) I've tried: plot(1:10,main=expression({sigma^2}[11])) (and variants). This "sort of" works but there is an undesirable gap between the sigma and the subscript 11. (IOW the subscript is to the right of the superscript, whereas ideally the first "1" in "11" should be vertically below the superscript. I've also tried (hammer and hope!): plot(1:10,main=expression(sigma*atop(scriptstyle(2),scriptstyle(11)))) and again this "sort of" works but places the putative superscript a bit too high and the putative subscript a bit too low. Is there any way to achieve, with plotmath, an effect like unto that produced by the LaTeX expression $\sigma^2_{11}$? Or should I just give up and go to the pub? :-) cheers, Rolf Turner P.S. I've explicitly CC-ed Paul Murrell, who is obviously the go-to guy on such matters, in case he does not regularly monitor this list. R. T. -- Honorary Research Fellow Department of Statistics University of Auckland Phone: +64-9-373-7599 ext. 88276
Dr Eberhard W Lisse
2020-Dec-09 08:12 UTC
[R] Subscript and superscript on one symbol; plotmath.
They let you guys go to the pup again? :-)-O el On 09/12/2020 10:06, Rolf Turner wrote: [...]> Is there any way to achieve, with plotmath, an effect like unto that > produced by the LaTeX expression $\sigma^2_{11}$? Or should I just > give up and go to the pub? :-)[...] -- Dr. Eberhard W. Lisse \ / Obstetrician & Gynaecologist el at lisse.NA / * | Telephone: +264 81 124 6733 (cell) PO Box 8421 Bachbrecht \ / If this email is signed with GPG/PGP 10007, Namibia ;____/ Sect 20 of Act No. 4 of 2019 may apply
Duncan Murdoch
2020-Dec-09 11:18 UTC
[R] Subscript and superscript on one symbol; plotmath.
On 09/12/2020 3:06 a.m., Rolf Turner wrote:> > I would like to produce, as graphical annotation, the Greek letter sigma > with a superscript of 2 and a subcript of 11. (I.e. the top left hand > entry of a covariance matrix.) > > I've tried: > > plot(1:10,main=expression({sigma^2}[11])) > > (and variants). This "sort of" works but there is an undesirable > gap between the sigma and the subscript 11. (IOW the subscript is to > the right of the superscript, whereas ideally the first "1" in "11" > should be vertically below the superscript.When I run plot(1:10,main=expression(sigma[11]^2)) I think I get what you want. Duncan Murdoch> > I've also tried (hammer and hope!): > > plot(1:10,main=expression(sigma*atop(scriptstyle(2),scriptstyle(11)))) > > and again this "sort of" works but places the putative superscript a > bit too high and the putative subscript a bit too low. > > Is there any way to achieve, with plotmath, an effect like unto that > produced by the LaTeX expression $\sigma^2_{11}$? Or should I just > give up and go to the pub? :-) > > cheers, > > Rolf Turner > > P.S. I've explicitly CC-ed Paul Murrell, who is obviously the go-to > guy on such matters, in case he does not regularly monitor this list. > > R. T. >