We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ee2d046 commit 229b49eCopy full SHA for 229b49e
lib/matplotlib/collections.py
@@ -234,9 +234,13 @@ 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)
+ print('Hiiii', (transOffset == transData))
+
+ if not (transOffset.is_affine and (transOffset == transData)):
240
+ # Finish the transform started above, but only
241
+ # if we have to (to save floating point precision)
242
+ offsets = (transOffset.get_affine() +
243
+ transData.inverted()).transform(offsets)
244
offsets = np.ma.masked_invalid(offsets)
245
if not offsets.mask.all():
246
points = np.row_stack((offsets.min(axis=0),
0 commit comments