@@ -1410,12 +1410,10 @@ def get_data_ratio(self):
1410
1410
-----
1411
1411
This method is intended to be overridden by new projection types.
1412
1412
"""
1413
- trf_xmin , trf_xmax = map (
1414
- self .xaxis .get_transform ().transform , self .get_xbound ())
1415
- trf_ymin , trf_ymax = map (
1416
- self .yaxis .get_transform ().transform , self .get_ybound ())
1417
- xsize = max (abs (trf_xmax - trf_xmin ), 1e-30 )
1418
- ysize = max (abs (trf_ymax - trf_ymin ), 1e-30 )
1413
+ txmin , txmax = self .xaxis .get_transform ().transform (self .get_xbound ())
1414
+ tymin , tymax = self .yaxis .get_transform ().transform (self .get_ybound ())
1415
+ xsize = max (abs (txmax - txmin ), 1e-30 )
1416
+ ysize = max (abs (tymax - tymin ), 1e-30 )
1419
1417
return ysize / xsize
1420
1418
1421
1419
@cbook .deprecated ("3.2" )
@@ -1492,8 +1490,8 @@ def apply_aspect(self, position=None):
1492
1490
1493
1491
x_trf = self .xaxis .get_transform ()
1494
1492
y_trf = self .yaxis .get_transform ()
1495
- xmin , xmax = map ( x_trf .transform , self .get_xbound ())
1496
- ymin , ymax = map ( y_trf .transform , self .get_ybound ())
1493
+ xmin , xmax = x_trf .transform ( self .get_xbound ())
1494
+ ymin , ymax = y_trf .transform ( self .get_ybound ())
1497
1495
xsize = max (abs (xmax - xmin ), 1e-30 )
1498
1496
ysize = max (abs (ymax - ymin ), 1e-30 )
1499
1497
@@ -1507,8 +1505,8 @@ def apply_aspect(self, position=None):
1507
1505
return
1508
1506
1509
1507
dL = self .dataLim
1510
- x0 , x1 = map ( x_trf .inverted (). transform , dL .intervalx )
1511
- y0 , y1 = map ( y_trf .inverted (). transform , dL .intervaly )
1508
+ x0 , x1 = x_trf .transform ( dL .intervalx )
1509
+ y0 , y1 = y_trf .transform ( dL .intervaly )
1512
1510
xr = 1.05 * (x1 - x0 )
1513
1511
yr = 1.05 * (y1 - y0 )
1514
1512
@@ -1544,12 +1542,12 @@ def apply_aspect(self, position=None):
1544
1542
yc = 0.5 * (ymin + ymax )
1545
1543
y0 = yc - Ysize / 2.0
1546
1544
y1 = yc + Ysize / 2.0
1547
- self .set_ybound (* map ( y_trf .inverted ().transform , ( y0 , y1 ) ))
1545
+ self .set_ybound (y_trf .inverted ().transform ([ y0 , y1 ] ))
1548
1546
else :
1549
1547
xc = 0.5 * (xmin + xmax )
1550
1548
x0 = xc - Xsize / 2.0
1551
1549
x1 = xc + Xsize / 2.0
1552
- self .set_xbound (* map ( x_trf .inverted ().transform , ( x0 , x1 ) ))
1550
+ self .set_xbound (x_trf .inverted ().transform ([ x0 , x1 ] ))
1553
1551
1554
1552
def axis (self , * args , emit = True , ** kwargs ):
1555
1553
"""
0 commit comments