@@ -7364,6 +7364,20 @@ def pcolor(self, *args, **kwargs):
7364
7364
7365
7365
x = X .compressed ()
7366
7366
y = Y .compressed ()
7367
+
7368
+ # Transform from native to data coordinates?
7369
+ t = collection ._transform
7370
+ if (not isinstance (t , mtransforms .Transform )
7371
+ and hasattr (t , '_as_mpl_transform' )):
7372
+ t = t ._as_mpl_transform (self .axes )
7373
+
7374
+ if t and any (t .contains_branch_seperately (self .transData )):
7375
+ trans_to_data = t - self .transData
7376
+ pts = np .vstack ([x , y ]).T .astype (np .float )
7377
+ transformed_pts = trans_to_data .transform (pts )
7378
+ x = transformed_pts [..., 0 ]
7379
+ y = transformed_pts [..., 1 ]
7380
+
7367
7381
minx = np .amin (x )
7368
7382
maxx = np .amax (x )
7369
7383
miny = np .amin (y )
@@ -7490,6 +7504,19 @@ def pcolormesh(self, *args, **kwargs):
7490
7504
collection .autoscale_None ()
7491
7505
7492
7506
self .grid (False )
7507
+
7508
+ # Transform from native to data coordinates?
7509
+ t = collection ._transform
7510
+ if (not isinstance (t , mtransforms .Transform )
7511
+ and hasattr (t , '_as_mpl_transform' )):
7512
+ t = t ._as_mpl_transform (self .axes )
7513
+
7514
+ if t and any (t .contains_branch_seperately (self .transData )):
7515
+ trans_to_data = t - self .transData
7516
+ pts = np .vstack ([X , Y ]).T .astype (np .float )
7517
+ transformed_pts = trans_to_data .transform (pts )
7518
+ X = transformed_pts [..., 0 ]
7519
+ Y = transformed_pts [..., 1 ]
7493
7520
7494
7521
minx = np .amin (X )
7495
7522
maxx = np .amax (X )
0 commit comments