[Rd] [R] pdf() and pch problems
Brian D Ripley
ripley at stats.ox.ac.uk
Thu Jan 22 16:08:43 CET 2009
On Thu, 22 Jan 2009, Gavin Simpson wrote:
> On Thu, 2009-01-22 at 15:21 +0100, Martin Maechler wrote:
>>>>>>> "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
>
> [Moved to R-Devel]
>
> Same problem on Fedora 8 through 10. The snippet Martin shows fixes the
> problem on those systems also. It would be very useful to have this
> documented somewhere either as a note in ?pdf or in perhaps in the R
> Installation and Administration Manual, until such a time as distro's
> fix these problems.
>
> To that end I'll also be filing a bug against fedora 10 when I get home
> (and confirm it is still there) as my system has an entry for 'Zapf
> Dingbats' but not 'ZapfDingbats' which causes the problems on my boxes.
It is there on my F10 system (brand-new, installed last night).
> Great to finally have worked around this issue --- not that it was R's
> fault. I had completely missed the useDingbats argument of pdf(). The Rd
> file does however make it sound that the default (TRUE) is there to fix
> the problem of broken PDF viewers, where surely it is the FALSE state
> that fixes the problem, or perhaps what was intended was that it is the
> argument itself that was provided to fix buggy viewers.
The argument itself. (This is not the only issue in PDF viewers,
BTW, but here xpdf and gs both also work correctly.)
> I'd be happy to patch any/all of those sources if someone in R Core
> would be willing to take a lot and possibly apply them?
Send them to me and I'll take a look.
>
> All the best,
>
> G
>
>>
>>
>>
>> >>> 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.
>>
>> ______________________________________________
>> 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
> %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>
--
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
More information about the R-devel
mailing list