Unicode characters in ggplot labels

2019-09-14 16:48发布

I can get ggplot to print Japanese Unicode characters in axis labels and legends, but not in labels. Is this a bug?

library(extrafont)
library(ggplot2)
data_frame <- cbind.data.frame("number"=c(1:3), "kana"=c("い","ろ","は"))
ggplot(data=data_frame, aes(kana, number)) + 
geom_point() + theme_gray(base_family = "Meiryo") ##works great

ggplot(data=data_frame, aes(kana, number, label=kana)) + 
geom_point() + geom_label() + theme_gray(base_family = "Meiryo") ##no such luck

0条回答
登录 后发表回答