[R] pdf() and pch problems

Martin Maechler maechler at stat.math.ethz.ch
Thu Jan 22 15:21:24 CET 2009


>>>>> "TZ" == T Zumbrunn <T.Zumbrunn at unibas.ch>
>>>>>     on Thu, 22 Jan 2009 14:52:37 +0100 writes:

    TZ> Quoting Brian D Ripley <ripley at stats.ox.ac.uk>:
    >> On Thu, 22 Jan 2009, Robin Hankin wrote:
    >> 
    >>> Hi
    >>> 
    >>> R-2.8.1,   Suse 11.1
    >>> 
    >>> I'm having problems with pdf(). In the following
    >>> transcript, file 'f.pdf' does not use the expected symbols for the plot.
    >>> It uses a 'q' letter instead of the open circle I get when
    >>> viewing the graphics window.
    >>> 
    >>> I also get the same under  r47678.
    >>> 
    >>> Does anyone else get this?
    >> 
    >> Yes, if you use a broken PDF viewer (you have not told us yours). From ?pdf
    >> 
    >> useDingbats: logical.  Should small circles be rendered _via_ the
    >> Dingbats font?  Defaults to true, which produces smaller and
    >> better output - this is provided for those who insist on
    >> using broken PDF viewers.
    >> 
    >> I get the problem in evince but not acroread in F10.

    TZ> The problem is caused by missing fontconfig rules in openSUSE 11.1  
    TZ> (that the PDF library poppler depends on). I reported the problem a  
    TZ> while ago here http://bugs.freedesktop.org/show_bug.cgi?id=18002  
    TZ> (instructions on how to fix the issue are included) and filed a bug at  
    TZ> the openSUSE bug database  
    TZ> https://bugzilla.novell.com/show_bug.cgi?id=434676. The bug was  
    TZ> closed, but I reopened it.

That's interesting, thank you very much, Thomas, for the extra
explanation!

As you know (but your text above could be read differently) this
bug ... quite long standing! ... seems to be much wider spread
than just (Open)SuSE.  I have seen and still see it on Redhat
(RHEL 5) and many Ubuntu versions too. 

And indeed, the workaround recommended (somewhere) in the above
URL is working for me too:

Add the following (without the "-----" lines) to your
~/.fonts.conf file (or create such a file) :
--snip---------------------------------------------------------
<alias binding="same">
 <family>ZapfDingbats</family>
 <accept><family>Dingbats</family></accept>
</alias>
--snip---------------------------------------------------------

Martin Maechler, ETH Zurich




    >>> le112:~/scratch/R-2.8.1% R --vanilla --quiet
    >>>> pdf(file='~/f.pdf')
    >>>> plot(1:10 , pch=1)
    >>>> dev.off()
    >>> null device
    >>> 1
    >>>> sessionInfo()
    >>> R version 2.8.1 (2008-12-22)
    >>> i686-pc-linux-gnu
    >>> 
    >>> locale:
    >>> LC_CTYPE=en_US.UTF-8;LC_NUMERIC=C;LC_TIME=en_US.UTF-8;LC_COLLATE=en_US.UTF-8;LC_MONETARY=C;LC_MESSAGES=en_US.UTF-8;LC_PAPER=en_US.UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_US.UTF-8;LC_IDENTIFICATION=C
    >>> 
    >>> attached base packages:
    >>> [1] stats     graphics  grDevices utils     datasets  methods     
    >>> base    > q()
    >>> le112:~/scratch/R-2.8.1%
    >>> 
    >>> 
    >>> 
    >>> 
    >>> 
    >>> 
    >>> 
    >>> 
    >>> -- 
    >>> Robin K. S. Hankin
    >>> Uncertainty Analyst
    >>> University of Cambridge
    >>> 19 Silver Street
    >>> Cambridge CB3 9EP
    >>> 01223-764877
    >>> 
    >>> ______________________________________________
    >>> 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.
    >>> 
    >> 
    >> -- 
    >> Brian D. Ripley,                  ripley at stats.ox.ac.uk
    >> Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
    >> University of Oxford,             Tel:  +44 1865 272861 (self)
    >> 1 South Parks Road,                     +44 1865 272866 (PA)
    >> Oxford OX1 3TG, UK                Fax:  +44 1865 272595
    >> 
    >> ______________________________________________
    >> 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.

    TZ> ______________________________________________
    TZ> R-help at r-project.org mailing list
    TZ> https://stat.ethz.ch/mailman/listinfo/r-help
    TZ> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
    TZ> and provide commented, minimal, self-contained, reproducible code.




More information about the R-help mailing list