Skip to content

Feature request: legend.title.position argument added to theme #5540

Closed

Description

@davidhodge931

Would the title.position argument from the guide_legend/guide_colourbar/guide_coloursteps functionality be able to be added as an argument (or arguments) to theme?

I always like the all my legends to have the title on top, so it'd be super helpful if I could do this via the theme

Activity

  1. added
    feature
    on Nov 25, 2023
  2. teunbrand commented on Nov 25, 2023

    @teunbrand
    Collaborator

    I like this suggestion, it also bothered me sometimes that this wasn't a theme option.

  3. teunbrand commented on Nov 25, 2023

    @teunbrand
    Collaborator

    Quick thought: In principle, we could treat legend.text.position the same for the label.position argument in guides. However, sometimes these are incompatible with the guide's direction: we cannot have a vertical colourbar with labels at the bottom side of the bar. So to avoid incompatible arguments, we probably shouldn't direct the label positions from the theme.

  4. davidhodge931 commented on Nov 25, 2023

    @davidhodge931
    Author

    It looks like at present in theme, the arguments prefixed legend relate also to the colourbar and coloursteps.

    An idea is to add colourbar. and coloursteps. prefixed arguments into theme. These could inherit from the equivalent legend. prefixed argument where there is one.

  5. teunbrand commented on Nov 25, 2023

    @teunbrand
    Collaborator

    It looks like at present in theme, the arguments prefixed legend relate also to the colourbar and coloursteps.

    It does, mostly through historical quirks I think. They apply to any non-position guide (i.e. not axes).

    An idea is to add colourbar. and coloursteps. prefixed arguments into theme

    I'm not an enormous fan of this, partly because the guides are opened for extensions now and setting that precedent (and expecting extension developers to follow it) would make themes even more unmanageable than they already are. The other half is that colourbars/coloursteps/binned guides are implemented as legends with 1 key, so most of what applies to legends also applies to the others.

  6. davidhodge931 commented on Nov 25, 2023

    @davidhodge931
    Author

    The non-position guides are awesome for flexibility, but I think using theme is much better for ease. So I think it'd be great to get as much as possible of the additional style stuff from the non-position guides into the theme. But, I can understand that you have to prioritise where you put your effort

  7. changed the title [-]Feature request: legend.title.position argument added to theme[/-] [+]Feature request: `legend.title.position` argument added to `theme`[/+] on Nov 25, 2023
  8. teunbrand commented on Nov 27, 2023

    @teunbrand
    Collaborator

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

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