The Wayback Machine - https://web.archive.org/web/20250528221705/https://github.com/matplotlib/matplotlib/issues/17946
Skip to content

Propagate loc="best" down to AnchoredOffsetbox? #17946

Open
@jklymak

Description

@jklymak

Folks often want a way to automatically place text, but not use a legend (#4489, #1313), but attempts to implement this have not passed muster (#12841)

As pointed out by @ImportanceofBeeingEarnest one way to make this more constrained is to use AnchoredOffsetbox which legend already uses, and just propagate the legend logic to the parent class. The folks could put their text or other annotations in this box.

@andrzejnovak I think what you're asking for is rather a loc="best" option for AnchoredOffsetbox, such that one could write AnchoredText("my text", loc="best"). This is very different from what this PR suggested, and most concerns raised here would not even apply.

Originally posted by @ImportanceOfBeingErnest in #12841 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Difficulty: Mediumhttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issues

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions