R ggplot2 中文乱码

p <-
  ggplot(Cresult1, aes(x =    时间 , y = cancelr , color = type)) + geom_line()

p+theme(text = element_text(family = 'STKaiti'))
R ggplot2 中文乱码_第1张图片
image.png
1、在打开quartz设备的时候指定

quartz(family='STKaiti')

2、通过与设备无关的par指定

par(family='STKaiti')

3、在作图函数中指定参数family

你可能感兴趣的:(R ggplot2 中文乱码)