Open
Description
Bug summary
- Labels / legend is not displayed
- Autoscale does nothing, I have to manually set the limits
Code for reproduction
import matplotlib.pyplot as plt
from matplotlib.collections import PatchCollection
from matplotlib.patches import Polygon
fig, axs = plt.subplots()
p1, p2 = Polygon([[0,0],[100,100],[200,0]], label="p1"), Polygon([[400,0],[500,100],[600,0]], label="p2")
p = PatchCollection([p1,p2], label="asd")
axs.add_collection(p, autolim=True)
axs.set_xlim(right=600)
axs.set_ylim(top=100)
axs.legend()
Actual outcome
Expected outcome
Legend is shown
Additional information
No response
Operating system
No response
Matplotlib Version
3.5.2
Matplotlib Backend
No response
Python version
No response
Jupyter version
No response
Installation
No response