• Welcome to LiuJason's Blog!

[已解决]R 语言ggplot2在MacOS X 下作图中文字符显示乱码问题

R语言 Jason 5 years ago (2019-03-08) 1489 Views 0 Comments

是因为系统字体的原因,ggplot2默认字体是不带中文的,因此需要指定带有中文的字体库,这里用了别人找好的字体库名:

theme(text = element_text(family = "STHeiti"))

加上上面的参数就可以正常显示了


This article is under CC BY-NC-SA 4.0 license.
Please quote the original link:https://www.liujason.com/article/233.html
Like (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址