在R中Windows与Linux环境不同 字体写法有时也有区别
下表是一些字体的对应
ggplot2中theme_get()$text可查看当前theme默认设置
字体默认为“sans”
可以看到支持字体 Times New Roman,只需在画图代码最后加上下面的代码
theme(text=element_text("serif"))
参考:https://stackoverflow.com/questions/34522732/changing-fonts-in-ggplot2