[R] Sweave, lty = 3 line incorect in pdf output
Achim Zeileis
Achim.Zeileis at uibk.ac.at
Thu Feb 11 10:53:43 CET 2010
Ken,
I can't contribute much, just that I tried to look into it and can't
replicate it. I tried it both with .Stex and .Rnw yielding identical
results, just like plotting it interactively (on my default X11) and
printing it via dev.copy2pdf(). All of the approaches seemed to yield the
same output which looks ok.
Just for the record...
Z
R> sessionInfo()
R version 2.10.1 (2009-12-14)
i486-pc-linux-gnu
locale:
[1] C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] fortunes_1.3-7
On Thu, 11 Feb 2010, Ken Knoblauch wrote:
> I'm having a problem with dotted lines (lty = 3) in the pdf output
> in documents generated with Sweave. In the displayed pdf, the
> dotted line does not show up and in the printed output, it is
> there but does not seem to respect the lwd argument, for example, it
> is very faint despite using lwd = 3. The dotted line is correct
> in a quartz window and if I save the Quartz window to a pdf
> and include it in the tex document, then the dotted line is there
> at the correct line width. Here is a short example, using the Stex
> convention for Sweave. I saved the quartz window in a file called
> quartzSave.pdf after running the document through Sweave a first
> time without the \includegraphics{quartzSave} line.
>
> \documentclass[10pt]{article}
> \usepackage{graphicx}
>
> \begin{document}
>
> Test of lty = 3 argument.
>
> \begin{Scode}{fig=TRUE,eps=FALSE}
> x <- 1:10
> plot(x, type = "l", lty = 3, lwd = 3)
> lines(x, 0.5 * x, type = "l")
> \end{Scode}
>
> Saved from Quartz window:
>
> \includegraphics{quartzSave}
>
>
> \end{document}
>
> I have attached the pdf created by Sweave (which is missing the dotted
> lines) in case it can get through the filter to R-help.
>
> sessionInfo()
> R version 2.10.1 Patched (2010-02-01 r51089)
> i386-apple-darwin9.8.0
>
> locale:
> [1] en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8
>
> attached base packages:
> [1] stats graphics grDevices utils datasets methods
> [7] base
>
> loaded via a namespace (and not attached):
> [1] tools_2.10.1
>
> Thanks for any help.
>
> Ken
>
> --
> Ken Knoblauch
> Inserm U846
> Stem-cell and Brain Research Institute
> Department of Integrative Neurosciences
> 18 avenue du Doyen Lépine
> 69500 Bron
> France
> tel: +33 (0)4 72 91 34 77
> fax: +33 (0)4 72 91 34 61
> portable: +33 (0)6 84 10 64 10
> http://www.sbri.fr/members/kenneth-knoblauch.html
>
> ----------------------------------------------------------------
>
>
More information about the R-help
mailing list