[R] Legend symbols mixed char and integer
Prof Brian Ripley
ripley at stats.ox.ac.uk
Sun Nov 28 08:54:43 CET 2010
On Sat, 27 Nov 2010, Mike Prager wrote:
> Dear Gurus,
>
> R 2.11.1 on Windows XP.
>
> This is a problem in interaction between R and pdftex.
>
> I need to generate a plot with both open and filled circles. It is
> simple enough, using pch=1 and pch=16.
>
> The R pdf graphics output is going into pdftex 1.40.10 (MikTeX 2.8).
>
> The R pdf is correct when viewed in other viewers. However, pdftex
> fills the open circles. I can work around this problem by using
> pch="o" for the open circles. However, that messes up the figure
> legend.
>
> Is it possible to use the pch argument of legend() to specify both a
> symbol number and a character? I haven't found the way.
You don't need to. pch="o" is the same as pch=111 (the ASCII number).
See ?points.
> Or is there some known work-around for the pdftex bug?
Well, pdftex is not a viewer and does not of itself process PDF
inclusions, but see ?pdf and the 'useDingbats' argument.
If you really think this is a bug in your LaTeX system, you should
report it. But you haven't shown us reproducible code, and similar
things have worked for me in the past.
>
> Thanks!
>
> --
> Mike Prager, NC, USA
--
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-help
mailing list