0

when I export a RStudio generated figure as image it works fine (attached png file)

plot(2,3, ylab="cannot export as I see it",
     xlab= expression(paste(delta^{13}, "C (\u2030)")))

enter image description here

but when I try to export the same figure as a pdf, the x-label expression within bracket gets distorted (also attached)!! is there a solution?

dev.copy2pdf(file="export.pdf", width = 3, height = 3.5)

enter image description here

ToNoY
  • 1,358
  • 2
  • 22
  • 43
  • Using `pdf(...);plot(...);dev.off();` (instead of `dev.copy2df`) it looks the same. – r2evans Oct 21 '18 at 19:46
  • tried that as well ... I am still getting those leveled dots ... is it because I am using a old version of R or something?!? – ToNoY Oct 21 '18 at 19:54
  • 2
    Duplicate of - https://stackoverflow.com/questions/12768176/unicode-characters-in-ggplot2-pdf-output#12775087 - short answer: install `Cairo` and use `cairo_pdf` driver. – Spacedman Oct 21 '18 at 20:09
  • I'll go with @Spacedman's recommendation. I'm using R-3.5.1 on win10, didn't know about this Cairo bug. – r2evans Oct 21 '18 at 20:18

0 Answers0