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

ggpie cutting off labels #429

Closed
vertesy opened this issue Sep 21, 2021 · 2 comments
Closed

ggpie cutting off labels #429

vertesy opened this issue Sep 21, 2021 · 2 comments

Comments

@vertesy
Copy link

vertesy commented Sep 21, 2021

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!

@caldwellst
Copy link

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().

@kassambara
Copy link
Owner

fixed now, 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

3 participants