ggpubr
ggpubr copied to clipboard
ggpie cutting off labels
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")
Appreciate your help!
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()
.
fixed now, thanks