您的当前位置:首页正文

「r<-方案」PDF 输出 Unicode 字符

来源:华佗小知识

正常情况下,使用 pdf 设备输出 Unicode 字符时所有的 Unicode 都会变成...

办法是指定device=cairo_pdf

如:

library(Cairo)
ggsave(filename="X:/yourpath/Plot1.pdf", plot=g, device=cairo_pdf,
       width = 8, height = 4, units = "in", dpi = 600)