Skip to content

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

Closed

Description

@davidhodge931

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!

Activity

  1. teunbrand commented on Nov 25, 2023

    @teunbrand
    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.

  2. added
    feature
    on Nov 25, 2023
  3. 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[/+] on Nov 25, 2023
  4. 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[/+] on Nov 25, 2023
  5. changed the title [-]Feature request: legend.key.spacing argument to be added to theme[/-] [+]Feature request: legend.key.spacing argument added to theme[/+] on Nov 25, 2023
  6. changed the title [-]Feature request: legend.key.spacing argument added to theme[/-] [+]Feature request: `legend.key.spacing` argument(s) added to `theme`[/+] on Nov 25, 2023
  7. teunbrand commented on Nov 27, 2023

    @teunbrand
    Collaborator

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

  8. davidhodge931 commented on Dec 1, 2023

    @davidhodge931
    Author

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

  9. teunbrand commented on Dec 1, 2023

    @teunbrand
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureguides 📏themes 💃

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions