Skip to content

Commit

Permalink
Merge pull request matplotlib#25495 from QuLogic/path-doc
Browse files Browse the repository at this point in the history
DOC: Clarify note in get_path_collection_extents
  • Loading branch information
oscargus authored Mar 19, 2023
2 parents 17fd9de + 4ac8328 commit 738ead8
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions lib/matplotlib/path.py
Original file line number Diff line number Diff line change
Expand Up @@ -1042,9 +1042,10 @@ def clip_to_bbox(self, bbox, inside=True):
def get_path_collection_extents(
master_transform, paths, transforms, offsets, offset_transform):
r"""
Given a sequence of `Path`\s, `.Transform`\s objects, and offsets, as
found in a `.PathCollection`, returns the bounding box that encapsulates
all of them.
Get bounding box of a `.PathCollection`\s internal objects.
That is, given a sequence of `Path`\s, `.Transform`\s objects, and offsets, as found
in a `.PathCollection`, return the bounding box that encapsulates all of them.
Parameters
----------
Expand All @@ -1058,12 +1059,14 @@ def get_path_collection_extents(
Notes
-----
The way that *paths*, *transforms* and *offsets* are combined
follows the same method as for collections: Each is iterated over
independently, so if you have 3 paths, 2 transforms and 1 offset,
their combinations are as follows:
(A, A, A), (B, B, A), (C, A, A)
The way that *paths*, *transforms* and *offsets* are combined follows the same
method as for collections: each is iterated over independently, so if you have 3
paths (A, B, C), 2 transforms (α, β) and 1 offset (O), their combinations are as
follows:
- (A, α, O)
- (B, β, O)
- (C, α, O)
"""
from .transforms import Bbox
if len(paths) == 0:
Expand Down

0 comments on commit 738ead8

Please sign in to comment.