1

My example is:

\documentclass[12pt]{article} \begin{document} <<eg, dev='tikz', size='normalsize', echo=FALSE, message=FALSE, warning=FALSE, sanitize=TRUE>>= require(ggplot2) p1 <- ggplot() + geom_segment(aes(x = 1, y = 1, xend = 2, yend = 2), linetype= 2) p1 @ \end{document} 

Which generates a dashed line (when using other graphics devices). When using tikz, there is a thin black line sitting underneath the dashed line. Any ideas as to how to get rid of this?

2
  • Might be related to github.com/yihui/tikzDevice/issues/63 You may ask if Kirill has got any progress on that issue if it is the same one. Commented Nov 2, 2014 at 2:45
  • It is indeed the same problem. I also get the correct output looking in my browser. In Sumatra, I see the extra line. Commented Nov 2, 2014 at 7:44

1 Answer 1

0

I have worked out a patch solution for this. Use geom_path to replace the misbehaving geoms. e.g.

 p1 + geom_path(data=data.frame(x=c(1, 2), y=c(1, 2)), aes(x=x, y=y), linetype=2) 

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.