Unicode characters in ggplot legend

流过昼夜 提交于 2019-12-12 17:01:47

问题


I am trying to plot some graph using ggplot2 in R and label the legends using unicode characters such as Japanese. The following is my code:

ggplot(mtcars, aes(x=mpg, y=wt, colour = 'ああ')) + geom_line()

But I end up getting the following plot:

The legend is not displayed properly. Could anyone tell me how to fix this? Thank you so much!!

来源:https://stackoverflow.com/questions/39348634/unicode-characters-in-ggplot-legend

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!