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

Legend does not show 'annotate' #8236

Closed as not planned
Closed as not planned
Labels
Difficulty: Mediumhttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issuesGood first issueOpen a pull request against these issues if there are no active ones!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
@jlecoeur

Description

@jlecoeur

When usingannotate to draw an arrow, it does not show up in the legend.

Example code:

importmatplotlib.pylabasplt%matplotlibinlinefig,ax=plt.subplots(1)ax.plot([0,1], [0,0],label='line1')ax.plot([0,1], [1,1],label='line2')ax.annotate("",xy=(0.4,1.0),xytext=(0.4,0.0),arrowprops={'arrowstyle':'<->','color':'C7' },label='distance')ax.legend()

gives:
annotate

I would expect an entry "distance" in the legend, with a grey double-sided arrow as symbol.

(I use Python 3.6.0 and Matplotlib 2.0.0 from Archlinux repository)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Difficulty: Mediumhttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issuesGood first issueOpen a pull request against these issues if there are no active ones!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

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp