EDIT
Next question: a custom graphics device in sweave shows how to integrate it into a custom graphics device.
This seems to look like using CairoPDF() frm the Cairo package using ubuntu14.04, R3.2.1. Stephane's EDIT in the comments: if CairoPDF() doesn't work, then try cairo_pdf() .
Some sweave code (using Rstudio)
\documentclass{article} \begin{document} \SweaveOpts{concordance=TRUE} <<Export_plot, echo=FALSE>>= library(Cairo) CairoPDF("test.pdf") par(mar=c(6,6,6,6)) ylab <- expression(paste("", bar(italic("\u2113")), "(",phi[0], "|", italic(list(x,y)), ")")) plot(0,0, ylab=ylab, cex.lab=2) invisible(dev.off()) @ %Plot \includegraphics[width=6cm]{test.pdf} \end{document}
This is the pdf output I get (note that resolution is garbage, as I converted it to png via gimp)

user20650
source share