Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Curves with same label not appearing in Figure options (only the last one) #19607

Closed
@axtschmied

Description

@axtschmied

Bug report

Bug summary
If there are multiple curves with the same label in a figure/subplot, only the last one of them can be selected in the Figure options window under the Curves tab. In the legend however, they appear as they should.

Code for reproduction

import matplotlib.pyplot as plt
plt.plot([0,1],[0,1],label="line")
plt.plot([0,1],[1,0],label="line")
plt.legend()
plt.show()

Actual outcome
See description above and the image below.

figure_options

Expected outcome
All curves should be listed in the Figure options window, even if they have the same label.

Matplotlib version

  • Operating system: Windows 10
  • Matplotlib version (import matplotlib; print(matplotlib.__version__)): 3.3.4
  • Matplotlib backend (print(matplotlib.get_backend())): Qt5Agg
  • Python version: 3.8.5
  • Jupyter version (if applicable): -
  • Other libraries: -

Matplotlib has been installed with pip.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions