Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify interaction between params of get_path_collection_extents. #26514

Merged
merged 1 commit into from
Aug 18, 2023

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Aug 13, 2023

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())

(We can discuss whether the behavior makes sense, especially as point_in_path_collection has the opposite behavior; it may be a bug, I'm just documenting the actual behavior.)

PR summary

PR checklist

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())
```
@QuLogic QuLogic added this to the v3.8.0 milestone Aug 18, 2023
@QuLogic QuLogic merged commit 3d2d072 into matplotlib:main Aug 18, 2023
40 checks passed
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Aug 18, 2023
@anntzer anntzer deleted the gpced branch August 18, 2023 10:39
ksunden added a commit that referenced this pull request Aug 18, 2023
…514-on-v3.8.x

Backport PR #26514 on branch v3.8.x (Clarify interaction between params of get_path_collection_extents.)
@ksunden ksunden mentioned this pull request Sep 15, 2023
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants