-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Closed
Labels
Release criticalFor bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.
Milestone
Description
Bug summary
With the 3.6.0.rc1, matplotlib is issuing warnings when preparing a legend if the axes contains artists that do not have a registered legend handler even if the artist was not provided with a label.
Code for reproduction
import numpy as np
import matplotlib.pyplot as plt
f, ax = plt.subplots()
ax.pcolormesh(np.random.uniform(0, 1, (10, 10)))
ax.get_legend_handles_labels()
Actual outcome
Warning:
/var/folders/pk/kq0vw6sj3ssd914z55j1qmzc0000gn/T/ipykernel_68178/1573363929.py:6: UserWarning: Legend does not support handles for QuadMesh instances.
See: https://matplotlib.org/stable/tutorials/intermediate/legend_guide.html#implementing-a-custom-legend-handler
ax.get_legend_handles_labels()
Expected outcome
This was not previously so noisy.
Additional information
I skimmed the existing issues and didn't see anything obviously reporting this, but haven't tried against main so apologies if this is a dupe.
Matplotlib Version
3.6.0.rc1
Metadata
Metadata
Assignees
Labels
Release criticalFor bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.