Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9e42778

Browse files
authored
Merge pull request #25503 from meeseeksmachine/auto-backport-of-pr-25495-on-v3.7.x
Backport PR #25495 on branch v3.7.x (DOC: Clarify note in get_path_collection_extents)
2 parents 415c0cf + 7d6b004 commit 9e42778

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

lib/matplotlib/path.py

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1048,9 +1048,10 @@ def clip_to_bbox(self, bbox, inside=True):
10481048
def get_path_collection_extents(
10491049
master_transform, paths, transforms, offsets, offset_transform):
10501050
r"""
1051-
Given a sequence of `Path`\s, `.Transform`\s objects, and offsets, as
1052-
found in a `.PathCollection`, returns the bounding box that encapsulates
1053-
all of them.
1051+
Get bounding box of a `.PathCollection`\s internal objects.
1052+
1053+
That is, given a sequence of `Path`\s, `.Transform`\s objects, and offsets, as found
1054+
in a `.PathCollection`, return the bounding box that encapsulates all of them.
10541055
10551056
Parameters
10561057
----------
@@ -1064,12 +1065,14 @@ def get_path_collection_extents(
10641065
10651066
Notes
10661067
-----
1067-
The way that *paths*, *transforms* and *offsets* are combined
1068-
follows the same method as for collections: Each is iterated over
1069-
independently, so if you have 3 paths, 2 transforms and 1 offset,
1070-
their combinations are as follows:
1071-
1072-
(A, A, A), (B, B, A), (C, A, A)
1068+
The way that *paths*, *transforms* and *offsets* are combined follows the same
1069+
method as for collections: each is iterated over independently, so if you have 3
1070+
paths (A, B, C), 2 transforms (α, β) and 1 offset (O), their combinations are as
1071+
follows:
1072+
1073+
- (A, α, O)
1074+
- (B, β, O)
1075+
- (C, α, O)
10731076
"""
10741077
from .transforms import Bbox
10751078
if len(paths) == 0:

0 commit comments

Comments
 (0)