Skip to content

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

Closed
@teunbrand

Description

@teunbrand

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions