Skip to content

MNT: Remove explicit use of default value add_collection(..., autolim=True) #30382

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/matplotlib/axes/_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -3043,7 +3043,7 @@ def broken_barh(self, xranges, yrange, align="bottom", **kwargs):
vertices.append([(x0, y0), (x0, y1), (x1, y1), (x1, y0)])

col = mcoll.PolyCollection(np.array(vertices), **kwargs)
self.add_collection(col, autolim=True)
self.add_collection(col)

return col

Expand Down Expand Up @@ -5821,7 +5821,7 @@ def quiver(self, *args, **kwargs):
# Make sure units are handled for x and y values
args = self._quiver_units(args, kwargs)
q = mquiver.Quiver(self, *args, **kwargs)
self.add_collection(q, autolim=True)
self.add_collection(q)
return q

# args can be some combination of X, Y, U, V, C and all should be replaced
Expand All @@ -5832,7 +5832,7 @@ def barbs(self, *args, **kwargs):
# Make sure units are handled for x and y values
args = self._quiver_units(args, kwargs)
b = mquiver.Barbs(self, *args, **kwargs)
self.add_collection(b, autolim=True)
self.add_collection(b)
return b

# Uses a custom implementation of data-kwarg handling in
Expand Down
4 changes: 2 additions & 2 deletions lib/matplotlib/tests/test_collections.py
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ def test_regularpolycollection_rotate():
col = mcollections.RegularPolyCollection(
4, sizes=(100,), rotation=alpha,
offsets=[xy], offset_transform=ax.transData)
ax.add_collection(col, autolim=True)
ax.add_collection(col)


@image_comparison(['regularpolycollection_scale.png'], remove_text=True)
Expand Down Expand Up @@ -552,7 +552,7 @@ def get_transform(self):
circle_areas = [np.pi / 2]
squares = SquareCollection(
sizes=circle_areas, offsets=xy, offset_transform=ax.transData)
ax.add_collection(squares, autolim=True)
ax.add_collection(squares)
ax.axis([-1, 1, -1, 1])


Expand Down
Loading