[R] Sweave PDF files show plot symbols as "q"
    Allan Engelhardt 
    allane at cybaea.com
       
    Wed Jun 30 14:12:35 CEST 2010
    
    
  
Thank you Gavin, this is useful.  The work-around for me then is to 
quickly run
pdf("test.pdf")
plot(0:25, pch=0:25)
dev.off()
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
Allan
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>
>
> HTH
>
> G
[...]
    
    
More information about the R-help
mailing list