ggpubr icon indicating copy to clipboard operation
ggpubr copied to clipboard

ggpie cutting off labels

Open vertesy opened this issue 3 years ago • 1 comments

Dear Alboukadel,

thanks for this awesome package, really useful! (I even built on top of it for further lazyfication ggExpress)

With ggpie I noticed that if slices have long names (and not using legend, directly labeling the sectiions), they are often cropped.

I was trying to fix it with margin, but that does not help with cropping.

I guess I am lacking terminology here, maybe I need to adjust: axis-range? canvas size?

Example


df <- data.frame(
  group = c("Male", "Female", "Children but not teenager"),
  value = c(25, 25, 50))

ggpie(df, "value", label = "group")

image

Appreciate your help!

vertesy avatar Sep 21 '21 17:09 vertesy

Referenced in an SO post I responded to. Would recommend amending ggpie() to add clip = "off" to the call to coord_polar() on line 26 as default, or allow passing the argument explicitly in ggpie().

caldwellst avatar Dec 14 '21 18:12 caldwellst

fixed now, thanks

kassambara avatar Dec 12 '22 21:12 kassambara