Skip to content
Prev 6880 / 15075 Next

Sweave, lty = 3 line incorect in pdf output

Ken Knoblauch <ken.knoblauch <at> inserm.fr> writes:
Some additional search in the pdf reference manual and I found that
1 j refers to linejoin choice (ljoin = 1 in par)
1 J to line end (lend = 1 in par)
pdf(file = "testPP.pdf")
par(lend = 1) # the default is 0 according to ?par
x <- 1:10
plot(x, type = "l", lty = 3, lwd = 3)
lines(x, 0.5 * x)
dev.off()

which produces the correct dotted line (in my viewer)...

I can add par(lend = 1) throughout my Sweave document, I guess.
If anybody has any further suggestions, or how to fix this globally,
I'm interested in hearing from you.  Thanks.

Ken