[R] Plotmath integral gets horrible with URWPalladio

Paul Murrell paul at stat.auckland.ac.nz
Wed Oct 3 13:27:13 CEST 2007


Paul Smith wrote:
> Dear All,
> With the following code:
> pdf(file="figure.pdf",family="URWPalladio")
> plot(0,0,type="n")
> text(0,0,expression(integral(f(x)*dx, a, b)))
> dev.off()
> the integral symbol gets horrible. With other fonts, the same does not
> occur. Is there some way of using Palatino-like fonts with a nice
> integral symbol? I am using R 2.5.1 on F7 (Linux).

That could just be your viewer not being able to find the font (which is 
what happens to me on this example).  Try using embedFonts(), like this ...


... which, if it succeeds, will place the fonts in the PDF and the 
viewer should be happy.

If that does not work, a workaround is to specify a different symbol 
font, like this ...

mypal <- Type1Font("URWPalladio",
                    c("p052003l.afm", "p052004l.afm",
                      "p052023l.afm", "p052024l.afm",
text(0,0,expression(integral(f(x)*dx, a, b)))


> Thanks in advance,
> Paul
> ______________________________________________
> 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 Paul Murrell
Department of Statistics
The University of Auckland
Private Bag 92019
New Zealand
64 9 3737599 x85392
paul at stat.auckland.ac.nz

More information about the R-help mailing list