8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ee2d046 commit a53833eCopy full SHA for a53833e
lib/matplotlib/collections.py
@@ -234,9 +234,11 @@ def get_datalim(self, transData):
234
# (i.e. like scatter). We can't uniquely set limits based on
235
# those shapes, so we just set the limits based on their
236
# location.
237
- # Finish the transform:
238
- offsets = (transOffset.get_affine() +
239
- transData.inverted()).transform(offsets)
+ if not (transOffset.is_affine and (transOffset == transData)):
+ # Finish the transform started above, but only
+ # if we have to (to save floating point precision)
240
+ offsets = (transOffset.get_affine() +
241
+ transData.inverted()).transform(offsets)
242
offsets = np.ma.masked_invalid(offsets)
243
if not offsets.mask.all():
244
points = np.row_stack((offsets.min(axis=0),
0 commit comments