8000 Take text objects into account in legend autopositioning. · Issue #7869 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content
Take text objects into account in legend autopositioning. #7869
Closed
@anntzer

Description

@anntzer

Legend autopositioning currently does not take text objects into account as can be checked by running

plt.plot([0, 1], label="foo"); plt.text(.05, .95, "a"); plt.legend()

This is because text objects are not included in _auto_legend_data (which only serves that purpose, AFAICT).

Adding them should be easy, but extra points if the autoplacement algorithm penalizes overlapping with text more than overlapping with other artists (given that it's probably indeed worse in general).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0