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

Appearance settings

[Bug]: triplot duplicates label legend  #22965

Copy link
Copy link
Closed
@maweigert

Description

@maweigert
Issue body actions

Bug summary

Hi,

When using triplot with a label the resulting legend contains two duplicated entries (even though the markers is None):

plt.triplot([0,2,1],[0,0,1],[[0,1,2]], label='Label'); 
plt.legend()

Screenshot 2022-05-03 at 12 17 10

I think expected behavior would be either

  1. Remove the second legend entry if no markers are given, or
  2. Remove the second legend entry altogether, e.g. by using kw_markers.pop('label',None) around here

Code for reproduction

see above

Actual outcome

see above

Expected outcome

see above

Additional information

No response

Operating system

MacOS

Matplotlib Version

3.6.0.dev2140+g2aa71eb355.d20220503

Matplotlib Backend

QtAgg

Python version

No response

Jupyter version

No response

Installation

pip

Metadata

Metadata

Assignees

No one assigned

    Labels

    API: default changesDifficulty: Easyhttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issueshttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issuesGood first issueOpen a pull request against these issues if there are no active ones!Open a pull request against these issues if there are no active ones!topic: legend

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.