STHDA forum

ggpubr » [Solved] How to Display Japanese Characters in ggpie()?

Administrator

rank_admin.png

Avatar

Signed up since: 10/02/2013

Messages: 32

On 08/11/2017 at 08h09
To display Japanese character specify the argument font.family = "HiraKakuProN-W3" in the ggpie() function.

library(ggpubr)
df4 <- data.frame(
  group = c("男性", "女性", "子供"),
  value = c(25, 25, 50))
head(df4)
labs <- paste0(df4$group, " (", df4$value, "%)")
ggpie(df4, x = "value", fill = "group", color = "white",
      title = "割合",
      palette = c("#00AFBB", "#E7B800", "#FC4E07"),
      label = labs, lab.pos = "in", lab.font = "white",
      font.family = "HiraKakuProN-W3")
Website    
Answer
You aren't allowed to write in this category
1 User online : 0 Administrator, 0 Moderator, 0 Member and 1 Visitor
User online : No member online