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

Deprecate legend.title.align and legend.text.align #5347

Closed
teunbrand opened this issue Jul 11, 2023 · 0 comments · Fixed by #5362
Closed

Deprecate legend.title.align and legend.text.align #5347

teunbrand opened this issue Jul 11, 2023 · 0 comments · Fixed by #5362

Comments

@teunbrand
Copy link
Collaborator

This has been alluded to in a 5 year old comment from @clauswilke here.

To recap:

  • They're obsolete, as title alignment can now be set using regular theme elements.
  • Legend title alignment can currently be set in 4 (!) ways (same story for legend text):
    • theme(legend.title.align = ...)
    • theme(legend.title = element_text(vjust = ..., hjust = ...)
    • guide_legend(title.theme = element_text(hjust = ..., vjust = ...))
    • guide_legend(title.hjust = ..., title.vjust = ...)
  • They can only be used to control horizontal alignment and not even vertical alignment.

Arguably, we only need the theme(legend.title = ...) and guide_legend(title.theme = ...) solutions and can deprecate the guide_legend(title.hjust = ..., title.vjust = ...) settings as well as they're also redundant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant