From ff16da1b92ce4258b1d9c5fbfec8d5dbef8e3d25 Mon Sep 17 00:00:00 2001 From: Antony Lee Date: Sun, 13 Aug 2023 15:32:25 +0200 Subject: [PATCH] Clarify interaction between params of get_path_collection_extents. That master_transform is ignored is clear looking at the implementation in _path.h (the `if (Ntransforms)` branch drops master_transform; compare with the implementation of point_in_path_collection). One can also compare ``` from matplotlib.path import *; from matplotlib.transforms import * get_path_collection_extents( Affine2D().scale(2, 3), [Path([(1, 2), (3, 4)])], [], [(0, 0)], IdentityTransform()) get_path_collection_extents( Affine2D().scale(2, 3), [Path([(1, 2), (3, 4)])], [IdentityTransform()], [(0, 0)], IdentityTransform()) ``` --- lib/matplotlib/path.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/matplotlib/path.py b/lib/matplotlib/path.py index a687db923c3c..e72eb1a9ca73 100644 --- a/lib/matplotlib/path.py +++ b/lib/matplotlib/path.py @@ -1063,6 +1063,7 @@ def get_path_collection_extents( Global transformation applied to all paths. paths : list of `Path` transforms : list of `~matplotlib.transforms.Affine2DBase` + If non-empty, this overrides *master_transform*. offsets : (N, 2) array-like offset_transform : `~matplotlib.transforms.Affine2DBase` Transform applied to the offsets before offsetting the path.