matplotlib.axes.Axes.add_collection#
- Axes.add_collection(collection, autolim=True)[source]#
Add a
Collectionto the Axes; return the collection.- Parameters:
- collection
Collection The collection to add.
- autolimbool
Whether to update data and view limits.
Changed in version 3.11: This now also updates the view limits, making explicit calls to
autoscale_viewunnecessary.As an implementation detail, the value "_datalim_only" is supported to smooth the internal transition from pre-3.11 behavior. This is not a public interface and will be removed again in the future.
- collection
Examples using matplotlib.axes.Axes.add_collection#
Create boxes from error bars using PatchCollection
Create boxes from error bars using PatchCollection