[R] Sweave PDF files show plot symbols as "q"
Gavin Simpson
gavin.simpson at ucl.ac.uk
Wed Jun 30 13:05:30 CEST 2010
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 have no problems with the PostScript version of the file
> (example-1.ps) and I have no problems with the PDF file on a Windows
> machine using the Acrobat reader. Also, odfWeave is consistent on all
> systems.
>
> 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
>
> Regards
>
> Allan
>
>
> [1] http://www.statistik.lmu.de/~leisch/Sweave/example-1.pdf
> [2] GNOME Document Viewer 2.28.2 from evince-2.28.2-2.fc12.x86_64
>
> > sessionInfo()
> R version 2.11.0 (2010-04-22)
> x86_64-unknown-linux-gnu
>
> locale:
> [1] LC_CTYPE=en_GB.UTF-8 LC_NUMERIC=C
> [3] LC_TIME=en_GB.UTF-8 LC_COLLATE=en_GB.UTF-8
> [5] LC_MONETARY=C LC_MESSAGES=en_GB.UTF-8
> [7] LC_PAPER=en_GB.UTF-8 LC_NAME=C
> [9] LC_ADDRESS=C LC_TELEPHONE=C
> [11] LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C
>
> attached base packages:
> [1] stats graphics grDevices datasets utils methods base
>
> other attached packages:
> [1] fortunes_1.3-7 ctv_0.6-0
>
> ______________________________________________
> 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. Gavin Simpson [t] +44 (0)20 7679 0522
ECRC, UCL Geography, [f] +44 (0)20 7679 0565
Pearson Building, [e] gavin.simpsonATNOSPAMucl.ac.uk
Gower Street, London [w] http://www.ucl.ac.uk/~ucfagls/
UK. WC1E 6BT. [w] http://www.freshwaters.org.uk
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
More information about the R-help
mailing list