ggpie
ggpie copied to clipboard
Customize the label
Hi @showteeth I wanna customize my labels, not 'count' or 'freq'. How can I do it? Thanks!!
Hi,
library(ggpie)
library(ggplot2)
# use labs or guides
ggpie(data = diamonds, group_key = "cut", count_type = "full",
label_info = c("count", "ratio"), label_type = "horizon", label_split = NULL,
label_size = 4, label_pos = "in") +
# labs(fill = "MY NEW TITLE")
guides(fill=guide_legend(title='MY NEW TITLE'))
Thank you for your answer, I found the answer in other questions https://github.com/showteeth/ggpie/issues/4#issuecomment-1434064376, but now I have another problem. My labels overlap because of too many words, is there any way to solve it?
Why not try rose pie plot?
You can only choose label info from count, ratio, and all (count and ratio).