-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Propagate minpos from Collections to Axes.datalim #18642
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
Changes from all commits
f70df4c
7e69d18
279ec45
06786f7
e85ea1b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -274,11 +274,11 @@ def get_datalim(self, transData): | |
# can properly have the axes limits set by their shape + | ||
# offset. LineCollections that have no offsets can | ||
# also use this algorithm (like streamplot). | ||
result = mpath.get_path_collection_extents( | ||
transform.get_affine(), paths, self.get_transforms(), | ||
return mpath.get_path_collection_extents( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. again, this could get some more explanation, given that there is a comment above, but this is clearly different. I'm not even sure I understand why you can change this like this. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The first argument is the master transform; instead of doing one transform when finding extents, and a second one after on the result, this does a combined transform from the get-go. This ensures that whatever is calculated for |
||
transform.get_affine() - transData, paths, | ||
self.get_transforms(), | ||
transOffset.transform_non_affine(offsets), | ||
transOffset.get_affine().frozen()) | ||
return result.transformed(transData.inverted()) | ||
if not self._offsetsNone: | ||
# this is for collections that have their paths (shapes) | ||
# in physical, axes-relative, or figure-relative units | ||
|
@@ -290,9 +290,9 @@ def get_datalim(self, transData): | |
# note A-B means A B^{-1} | ||
offsets = np.ma.masked_invalid(offsets) | ||
if not offsets.mask.all(): | ||
points = np.row_stack((offsets.min(axis=0), | ||
offsets.max(axis=0))) | ||
return transforms.Bbox(points) | ||
bbox = transforms.Bbox.null() | ||
bbox.update_from_data_xy(offsets) | ||
return bbox | ||
return transforms.Bbox.null() | ||
|
||
def get_window_extent(self, renderer): | ||
|
Uh oh!
There was an error while loading. Please reload this page.