Error using Arial in .eps figure with extrafont package

前端 未结 3 1639
臣服心动
臣服心动 2021-01-14 07:42

I\'m using ggplot2 in R to generate figures for a publication in which all figures need to be .eps format and all fonts needs to be Arial. I\'ve been following this guide to

3条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-14 08:12

    Instead of extrafont package

    library(ggplot2)
    plot <- ggplot(mtcars, aes(wt, qsec)) + 
      geom_point() + 
      theme(text = element_text(family = "Arial"),
            axis.title = element_text(size = 22))
    
    ggsave(filename = "myfile.eps",plot)
    

提交回复
热议问题