Re: [R] Sweave PDF files show plot symbols as "q"

From: Allan Engelhardt <>
Date: Wed, 30 Jun 2010 13:12:35 +0100

Thank you Gavin, this is useful. The work-around for me then is to quickly run

plot(0:25, pch=0:25)

to see which "pch" values are not safe (unsafe.pch <- c(1, 10, 13, 16, 19, 20, 21)) and make sure I never use them. (The first four, btw., corresponds to the symbols that are different in S and R.)

This should be feasible, if somewhat tedious to test. Does anybody know of a way to get R to stop if a 'pch' value in this list is ever being used?

Changing configuration files on clients' systems in three continents isn't really an option. They expect it to "just work" when they click on the file. I guess I could always downgrade to SPSS or something.... :-)

Thanks again


On 30/06/10 12:05, Gavin Simpson wrote:
> On Wed, 2010-06-30 at 10:19 +0100, Allan Engelhardt wrote:
>> I'm guessing this is a FAQ but I can't find it and that it is probably
>> not exclusive R related but relevant so I thought I'd ask:
>> When I view the PDF output from Sweave (e.g. Example 1 from the author's
>> web site at [1]) on a Linux system using the standard PDF viewer [2],
>> the circles for the outliers in the plot [boxplot(Ozone ~ Month, data =
>> airquality)] show up as the letter 'q'.
>> [...]
>> I need to generate reports from R that work (=look the same) across
>> platforms: does anybody have a suggestion for a workaround?
> See ?pdf particularly the Notes section, which has:
> On some systems the default plotting character ‘pch = 1’ is
> displayed in some PDF viewers incorrectly as a ‘"q"’ character.
> (These seem to be viewers based on the ‘poppler’ PDF rendering
> library). This may be due to incorrect or incomplete mapping of
> font names to those used by the system. Adding the following
> lines to ‘~/.fonts.conf’ or ‘/etc/fonts/local.conf’ may circumvent
> this problem.
> <alias binding="same">
> <family>ZapfDingbats</family>
> <accept><family>Dingbats</family></accept>
> </alias>
> G
[...] mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Wed 30 Jun 2010 - 12:15:38 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 30 Jun 2010 - 12:50:43 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive