Modifying fonts in ggplot2

前端 未结 7 1345
再見小時候
再見小時候 2020-11-29 16:43

I am looking for a way to modify font types in ggplot. At the moment I would be happy enough to simply change fonts to the \'courier\' font family, but ultimately my goal is

7条回答
  •  生来不讨喜
    2020-11-29 17:25

    You can set the font of the labels produced by geom_text with grid.gedit:

    grid.gedit("GRID.text",gp=gpar(fontfamily="mono"))
    

    Call this after you have produced your original plot.

提交回复
热议问题