I am generating a pdf plot with R:

p <- c(0.226809355461365, 0.230331183191861, 0.245193329547248, 0.230982114615013, 
0.231497802927267, 0.2296662312173, 0.224856867748048, 0.230695540365456, 
0.236123643694864, 0.231331519186633, 0.24379985029512, 0.226912065850285, 
0.23417412288571, 0.235899589363286, 0.228283031513041, 0.23916147294911, 
0.232824226161469, 0.230780562962366, 0.234744032499568, 0.22916648058246

o <- structure(c(1L, 2L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 1L, 2L, 2L, 
2L, 2L, 1L, 2L, 2L, 2L, 2L), .Label = c("pos", "neg"), class = "factor")
pred <- prediction(p, o, label.ordering = c("neg", "pos"))
perf <- performance(pred, measure = "tpr", x.measure = "fpr")

pdf(file = "test.pdf", width = 3, height = 3)
plot(perf, avg="threshold", print.cutoffs.at=0.23, text.adj=c(0.5,1.5))

The example plot

This plot has a point. When I try to display it with pdflatex, the point doesn't show (but the rest if fine). Also, the pdf figure does have the point (seen when opened with a pdf viewer directly).

\caption{Do you see any points?}

I am not sure what information about my tex config I should give, so please ask if I forget anything important. I use pdfTeX, Version 3.14159265-2.6-1.40.15 (MiKTeX 2.9) (preloaded format=pdflatex 2015.5.29).

I am pretty sure I saw some resources one day about this very problem but I wasn't able to find it back with google.

  • Do you mean the circle labelled "0.23"?
    – Jongware
    Sep 26, 2015 at 20:14
  • I do. I call it a point because it's a point object in R graphics while the line (although mathematically composed of points) is a line object.
    – asac
    Sep 26, 2015 at 20:34

2 Answers 2


I encountered similar issue and then realised it was the preview of my editor (texstudio) which was responsible as when I opened the pdf file points were showing up.

Maybe it can help.


I usually make the plots within R and export it to SVG. Then I use son image editor such as Inkscape to create a PDF version. This PDF version looks nice in the final latex document. I have done this several time with optimal results.

  • This doesn't answer the question at hand, and is better-suited as a comment.
    – Werner
    Nov 4, 2015 at 19:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.