Skip to content

Commit 2d0127a

Browse files
Deprecate count_contains
1 parent 8fc13ec commit 2d0127a

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
``BboxBase.count_contains`` is deprecated
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
4+
`.BboxBase.count_contains` is deprecated with no replacement. To count how many
5+
points fall inside a bounding box, test the coordinates directly.

lib/matplotlib/transforms.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -581,6 +581,7 @@ def splity(self, *args):
581581
return [Bbox([[x0, y0 + yf0 * h], [x1, y0 + yf1 * h]])
582582
for yf0, yf1 in itertools.pairwise(yf)]
583583

584+
@_api.deprecated("3.12")
584585
def count_contains(self, vertices):
585586
"""
586587
Count the number of vertices contained in the `Bbox`.

0 commit comments

Comments
 (0)