Skip to content

Feature request: legend.key.spacing argument(s) added to theme #5539

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

Closed
davidhodge931 opened this issue Nov 25, 2023 · 4 comments · Fixed by #5554
Closed

Feature request: legend.key.spacing argument(s) added to theme #5539

davidhodge931 opened this issue Nov 25, 2023 · 4 comments · Fixed by #5554
Labels
feature a feature request or enhancement guides 📏 themes 💃

Comments

@davidhodge931
Copy link

The new reworked legend spacing will allow the spacing between legend key/label elements to be controlled with guide_legend(key.spacing = ...)

It'd be great if you could allow this to be modified through the theme argument as well.

Otherwise, users cannot incorporate their desired legend key spacing up in a theme function. They have to instead use the guides each time they make a plot to adjust it how they want.

Thanks, and great work with the ggplot2 development!

@teunbrand
Copy link
Collaborator

Thank that is a good argument. The reason it wasn't done this way is because the key spacing doesn't apply universally to every non-position guide but only to legends, but I can see the merit in setting this in the theme.

@teunbrand teunbrand added feature a feature request or enhancement guides 📏 themes 💃 labels Nov 25, 2023
@davidhodge931 davidhodge931 changed the title legend spacing rework: allow legend key spacing to be controlled through the theme legend spacing rework: legend.key.spacing argument to be added to theme Nov 25, 2023
@davidhodge931 davidhodge931 changed the title legend spacing rework: legend.key.spacing argument to be added to theme Feature request: legend.key.spacing argument to be added to theme Nov 25, 2023
@davidhodge931 davidhodge931 changed the title Feature request: legend.key.spacing argument to be added to theme Feature request: legend.key.spacing argument added to theme Nov 25, 2023
@davidhodge931 davidhodge931 changed the title Feature request: legend.key.spacing argument added to theme Feature request: legend.key.spacing argument(s) added to theme Nov 25, 2023
@teunbrand
Copy link
Collaborator

Probably makes most sense to implement this after #5512 is merged.

@davidhodge931
Copy link
Author

It'd be awesome, if this could scale with the base_size by default

@teunbrand
Copy link
Collaborator

It currently does that implicitly, but might indeed be better to do this explicitly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature a feature request or enhancement guides 📏 themes 💃
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants