Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Option to place legend labels near to the data #12939

Closed as not planned
Closed as not planned
Labels
New featurestatus: closed as inactiveIssues closed by the "Stale" Github Action. Please comment on any you think should still be open.status: inactiveMarked by the “Stale” Github Action
@Christopher-Bradshaw

Description

@Christopher-Bradshaw

I was wondering if you had considered a legend option that labels each line near to the line, e.g. fromhere.

image

I was imagining that this could be similar to the current API of:

ax.plot(xdata, ydata, label="Oil")ax.legend(loc="near_line") # or something

Automatically deciding where to place the legends might be tricky - mentioned by theTufte in R package. So there would probably also need to be a way to manually specify locations for tricky cases.

image

I know that this can be done manually withannotate (this is what I am currently doing, usually just shifted wrt the first/last point of the data) and there is some sample code to somewhat automate it e.g.1,2.

Have I missed a native way to do this? If not, is it something that matplotlib would be interested in?

Metadata

Metadata

Assignees

No one assigned

    Labels

    New featurestatus: closed as inactiveIssues closed by the "Stale" Github Action. Please comment on any you think should still be open.status: inactiveMarked by the “Stale” Github Action

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp