@@ -2205,7 +2205,7 @@ def ticklabel_format(self, **kwargs):
22052205 *scilimits* (m, n), pair of integers; if *style*
22062206 is 'sci', scientific notation will
22072207 be used for numbers outside the range
2208- 10`- m`:sup: to 10`n`:sup:.
2208+ 10`m`:sup: to 10`n`:sup:.
22092209 Use (0,0) to include all numbers.
22102210 *useOffset* [True | False | offset]; if True,
22112211 the offset will be calculated as needed;
@@ -7364,6 +7364,20 @@ def pcolor(self, *args, **kwargs):
73647364
73657365 x = X .compressed ()
73667366 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+
73677381 minx = np .amin (x )
73687382 maxx = np .amax (x )
73697383 miny = np .amin (y )
@@ -7490,6 +7504,19 @@ def pcolormesh(self, *args, **kwargs):
74907504 collection .autoscale_None ()
74917505
74927506 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 ]
74937520
74947521 minx = np .amin (X )
74957522 maxx = np .amax (X )
@@ -8072,7 +8099,7 @@ def hist(self, x, bins=10, range=None, normed=False, weights=None,
80728099 # so that each histogram uses the same bins
80738100 m , bins = np .histogram (x [i ], bins , weights = w [i ], ** hist_kwargs )
80748101 if mlast is None :
8075- mlast = np .zeros (len (bins )- 1 , np . int )
8102+ mlast = np .zeros (len (bins )- 1 , m . dtype )
80768103 if normed :
80778104 db = np .diff (bins )
80788105 m = (m .astype (float ) / db ) / m .sum ()
0 commit comments