ggpie icon indicating copy to clipboard operation
ggpie copied to clipboard

Customize the label

Open orange-3711 opened this issue 1 year ago • 5 comments

Hi @showteeth I wanna customize my labels, not 'count' or 'freq'. How can I do it? Thanks!!

orange-3711 avatar May 15 '23 03:05 orange-3711

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'))

showteeth avatar May 15 '23 05:05 showteeth

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?

image

orange-3711 avatar May 15 '23 07:05 orange-3711

Why not try rose pie plot?

showteeth avatar May 15 '23 07:05 showteeth

Why not try rose pie plot?

That's a good choice. But I just want to label info as group.

image

orange-3711 avatar May 15 '23 08:05 orange-3711

You can only choose label info from count, ratio, and all (count and ratio).

showteeth avatar May 15 '23 08:05 showteeth