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

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

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

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

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

Comments

@davidhodge931
Copy link

davidhodge931 commented Nov 25, 2023

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

@teunbrand teunbrand added guides 📏 themes 💃 feature a feature request or enhancement labels Nov 25, 2023
@teunbrand
Copy link
Collaborator

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

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

@davidhodge931
Copy link
Author

davidhodge931 commented Nov 25, 2023

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.

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

@davidhodge931
Copy link
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

@davidhodge931 davidhodge931 changed the title Feature request: legend.title.position argument added to theme Feature request: legend.title.position argument added to theme Nov 25, 2023
@teunbrand
Copy link
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
Labels
feature a feature request or enhancement guides 📏 themes 💃
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants