Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4a61d3a

Browse filesBrowse files
committed
Merge pull request matplotlib#8490 from anntzer/clarify-contains_x-docstring
DOC: Clarify that Path.contains_x implicitly closes the Path.
1 parent 0c5ab82 commit 4a61d3a
Copy full SHA for 4a61d3a

File tree

Expand file treeCollapse file tree

1 file changed

+12
-14
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+12
-14
lines changed

‎lib/matplotlib/path.py

Copy file name to clipboardExpand all lines: lib/matplotlib/path.py
+12-14Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -486,13 +486,12 @@ def transformed(self, transform):
486486

487487
def contains_point(self, point, transform=None, radius=0.0):
488488
"""
489-
Returns *True* if the path contains the given point.
489+
Returns whether the (closed) path contains the given point.
490490
491-
If *transform* is not *None*, the path will be transformed
492-
before performing the test.
491+
If *transform* is not ``None``, the path will be transformed before
492+
performing the test.
493493
494-
*radius* allows the path to be made slightly larger or
495-
smaller.
494+
*radius* allows the path to be made slightly larger or smaller.
496495
"""
497496
if transform is not None:
498497
transform = transform.frozen()
@@ -502,14 +501,13 @@ def contains_point(self, point, transform=None, radius=0.0):
502501

503502
def contains_points(self, points, transform=None, radius=0.0):
504503
"""
505-
Returns a bool array which is *True* if the path contains the
506-
corresponding point.
504+
Returns a bool array which is ``True`` if the (closed) path contains
505+
the corresponding point.
507506
508-
If *transform* is not *None*, the path will be transformed
509-
before performing the test.
507+
If *transform* is not ``None``, the path will be transformed before
508+
performing the test.
510509
511-
*radius* allows the path to be made slightly larger or
512-
smaller.
510+
*radius* allows the path to be made slightly larger or smaller.
513511
"""
514512
if transform is not None:
515513
transform = transform.frozen()
@@ -518,10 +516,10 @@ def contains_points(self, points, transform=None, radius=0.0):
518516

519517
def contains_path(self, path, transform=None):
520518
"""
521-
Returns *True* if this path completely contains the given path.
519+
Returns whether this (closed) path completely contains the given path.
522520
523-
If *transform* is not *None*, the path will be transformed
524-
before performing the test.
521+
If *transform* is not ``None``, the path will be transformed before
522+
performing the test.
525523
"""
526524
if transform is not None:
527525
transform = transform.frozen()

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.