This code does not work as expected: pdf("foo.pdf") x <- 1:20 y <- sin(x) plot(x,y) dev.off() Instead of little circles at the points I get the letter 'q', and this happens for the default pch, pch=1, pch=21. If I set pch='o' I get the circles, but of course they are not centered. The problem occurs with pdf viewer and with printing under Linux, R 2.10.0. Everything works as expected if I use other display devices.
On Nov 5, 2009, at 11:15 AM, Dominick Samperi wrote:> This code does not work as expected: > > pdf("foo.pdf") > x <- 1:20 > y <- sin(x) > plot(x,y) > dev.off() > > Instead of little circles at the points I get the letter 'q', and this > happens for the default pch, pch=1, pch=21. If I set pch='o' I > get the circles, but of course they are not centered. The problem > occurs with pdf viewer and with printing under Linux, > R 2.10.0. > > Everything works as expected if I use other display devices.See ?pdf and read through the "Note" section. This was just covered on r-devel only days ago: https://stat.ethz.ch/pipermail/r-devel/2009-October/055357.html HTH, Marc Schwartz
Ben Bolker
2009-Nov-05 19:39 UTC
[Rd] Typos in ?pdf (was Re: Problem with pdf graphics device)
Marc Schwartz <marc_schwartz <at> me.com> writes:>[snip]> See ?pdf and read through the "Note" section. >While I was reading this I noticed two minor typos in pdf.Rd. These patches are against the latest SVN devel version. *** pdf.Rd.orig 2009-11-05 14:37:44.000000000 -0500 --- pdf.Rd 2009-11-05 14:38:24.000000000 -0500 *************** *** 199,205 **** problem is much more likely to be in your viewer than in \R. Try another viewer if possible. Symptoms for which the viewer has been at fault are apparent grids on image plots (turn off graphics ! anti-aliasing in your viewer if you) and missing or incorrect glyphs in text (viewers silently doing font substitution). Unfortunately the default viewers on most Linux and Mac OS X systems --- 199,205 ---- problem is much more likely to be in your viewer than in \R. Try another viewer if possible. Symptoms for which the viewer has been at fault are apparent grids on image plots (turn off graphics ! anti-aliasing in your viewer if you can) and missing or incorrect glyphs in text (viewers silently doing font substitution). Unfortunately the default viewers on most Linux and Mac OS X systems *************** *** 224,230 **** On some systems the default plotting character \code{pch = 1} is displayed in some PDF viewers incorrectly as a \code{"q"} character. (These seem to be viewers based on the \samp{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 \file{~/.fonts.conf} or \file{/etc/fonts/local.conf} may circumvent this problem. --- 224,230 ---- On some systems the default plotting character \code{pch = 1} is displayed in some PDF viewers incorrectly as a \code{"q"} character. (These seem to be viewers based on the \samp{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 \file{~/.fonts.conf} or \file{/etc/fonts/local.conf} may circumvent this problem.