Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can not display Japanese characters #15

Closed
tomochan001 opened this issue Jul 28, 2017 · 8 comments
Closed

can not display Japanese characters #15

tomochan001 opened this issue Jul 28, 2017 · 8 comments

Comments

@tomochan001
Copy link

Thanks for a great library! I really love it.
But it seems to lack support for Japanese characters.

https://www.dropbox.com/s/ai4tgnaey428qzk/%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%83%E3%83%88%202017-07-28%2011.54.46.png?dl=0

I assume I can work around if I can change the font.
Can I do that?

@kassambara
Copy link
Owner

New argument font.family added now in ggpie().

Install the latest developmental version and specify the argument font.family = "HiraKakuProN-W3" in the ggpie() function.

If it doesn't work, then provide a reproducible example.

@tomochan001
Copy link
Author

It works well on texts in the chart, but does not apply to the title.

`library(ggpubr)
library(dplyr)

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")`

@kassambara
Copy link
Owner

Updated now. Please re-install. Should work now. Kindly confirm it, thanks.

@kassambara
Copy link
Owner

Can we close this issue now?

@tomochan001
Copy link
Author

Thanks for updating. I have tried it out.
Is there any way for centering the title, and moving the label 'men' on red slice slightly to the right?
2017-08-09 15 55 39

@kassambara
Copy link
Owner

Hi,

you can adjust label position by specifying the argument lab.adjust, for example try lab.adjust = 1 (refer to the documentation of ?ggpie)

@tomochan001
Copy link
Author

I made it! Thanks.

2017-08-11 12 06 19

@kassambara
Copy link
Owner

Great! so we can close this issue, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants