[R] pdf greek letter typos

Eduardo de Oliveira Horta eduardo.oliveirahorta at gmail.com
Thu Jan 27 04:29:31 CET 2011


Hi there,

yet on the topic of greek letters and pdf plotting: when I run the
following code

pdf(file="temp.pdf")
mu=seq(from=-pi, to=pi, length=100)
plot(mu, sin(mu^2),
     type="l",
     xlab=expression(mu%in%(list(-pi,pi))),
     ylab=expression(sin(mu^2)),
     main=expression((list(mu,sin(mu^2)))))
dev.off()

I get a "proportional to" symbol in place of a "mu" and a "not equal
to" in place of a "pi" (see attached file). If I run only

mu=seq(from=-pi, to=pi, length=100)
plot(mu, sin(mu^2),
     type="l",
     xlab=expression(mu%in%(list(-pi,pi))),
     ylab=expression(sin(mu^2)),
     main=expression((list(mu,sin(mu^2)))))

then the characters are displayed correctly.

I would like to know if there is any sort of fixes to this problem,
such as specifying the symbols font or embedding fonts into the pdf
file. Any help would be welcome.

Thanks in advance and best regards,

Eduardo Horta
-------------- next part --------------
A non-text attachment was scrubbed...
Name: temp.pdf
Type: application/pdf
Size: 5726 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20110127/65b8ba1c/attachment.pdf>


More information about the R-help mailing list