Skip to content

Commit 4ac8328

Browse files
committed
DOC: Clarify note in get_path_collection_extents
I found it confusing that it was listing A, A, A, A... a bunch of times. Also, add an initial line for short docs.
1 parent 78bf53c commit 4ac8328

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
@@ -1042,9 +1042,10 @@ def clip_to_bbox(self, bbox, inside=True):
10421042
def get_path_collection_extents(
10431043
master_transform, paths, transforms, offsets, offset_transform):
10441044
r"""
1045-
Given a sequence of `Path`\s, `.Transform`\s objects, and offsets, as
1046-
found in a `.PathCollection`, returns the bounding box that encapsulates
1047-
all of them.
1045+
Get bounding box of a `.PathCollection`\s internal objects.
1046+
1047+
That is, given a sequence of `Path`\s, `.Transform`\s objects, and offsets, as found
1048+
in a `.PathCollection`, return the bounding box that encapsulates all of them.
10481049
10491050
Parameters
10501051
----------
@@ -1058,12 +1059,14 @@ def get_path_collection_extents(
10581059
10591060
Notes
10601061
-----
1061-
The way that *paths*, *transforms* and *offsets* are combined
1062-
follows the same method as for collections: Each is iterated over
1063-
independently, so if you have 3 paths, 2 transforms and 1 offset,
1064-
their combinations are as follows:
1065-
1066-
(A, A, A), (B, B, A), (C, A, A)
1062+
The way that *paths*, *transforms* and *offsets* are combined follows the same
1063+
method as for collections: each is iterated over independently, so if you have 3
1064+
paths (A, B, C), 2 transforms (α, β) and 1 offset (O), their combinations are as
1065+
follows:
1066+
1067+
- (A, α, O)
1068+
- (B, β, O)
1069+
- (C, α, O)
10671070
"""
10681071
from .transforms import Bbox
10691072
if len(paths) == 0:

0 commit comments

Comments
 (0)