Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Open
Description
Bug summary
When a contour plot is made and a legend is added, the marker for the contour plot is not shown.
Code for reproduction
importmatplotlib.pyplotaspltimportnumpyasnpdata=np.random.randint(100,size=(100,100))plt.figure()cs=plt.contour(data,levels=[50])cs.collections[0].set_label('label')plt.legend()plt.show()
Actual outcome
Expected outcome
In the area for the legend, next to the label for the legend, there should a solid purple line. Solid purple line would represent the lines in the main plot for that contour.
Additional information
No response
Operating system
Rocky Linux release 8.5 (Green Obsidian)
Matplotlib Version
3.5.2
Matplotlib Backend
module://matplotlib_inline.backend_inline
Python version
Python 3.9.13
Jupyter version
3.4.3
Installation
conda