Closed
Description
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()
I think expected behavior would be either
- Remove the second legend entry if no markers are given, or
- Remove the second legend entry altogether, e.g. by using
kw_markers.pop('label',None)
around herematplotlib/lib/matplotlib/tri/triplot.py
Line 78 in 2aa71eb
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