@@ -62,7 +62,8 @@ def __init__(self, scale_factor):
62
62
self ._scale_factor = scale_factor
63
63
64
64
def _as_mpl_transform (self , axes ):
65
- return mtransforms .Affine2D ().scale (self ._scale_factor ) + axes .transData
65
+ return (mtransforms .Affine2D ().scale (self ._scale_factor )
66
+ + axes .transData )
66
67
67
68
ax = plt .axes ()
68
69
line , = plt .plot (np .arange (10 ), transform = ScaledBy (10 ))
@@ -191,7 +192,7 @@ def test_clipping_of_log():
191
192
192
193
# something like this happens in plotting logarithmic histograms
193
194
trans = mtransforms .BlendedGenericTransform (mtransforms .Affine2D (),
194
- LogScale .Log10Transform ('clip' ))
195
+ LogScale .Log10Transform ('clip' ))
195
196
tpath = trans .transform_path_non_affine (path )
196
197
result = tpath .iter_segments (trans .get_affine (),
197
198
clip = (0 , 0 , 100 , 100 ),
@@ -379,7 +380,8 @@ def test_line_extent_compound_coords1(self):
379
380
# a simple line in data coordinates in the y component, and in axes
380
381
# coordinates in the x
381
382
ax = plt .axes ()
382
- trans = mtransforms .blended_transform_factory (ax .transAxes , ax .transData )
383
+ trans = mtransforms .blended_transform_factory (ax .transAxes ,
384
+ ax .transData )
383
385
ax .plot ([0.1 , 1.2 , 0.8 ], [35 , - 5 , 18 ], transform = trans )
384
386
assert_array_equal (ax .dataLim .get_points (),
385
387
np .array ([[np .inf , - 5. ],
@@ -399,8 +401,8 @@ def test_line_extent_compound_coords2(self):
399
401
# a simple line in (offset + data) coordinates in the y component, and
400
402
# in axes coordinates in the x
401
403
ax = plt .axes ()
402
- trans = mtransforms .blended_transform_factory (
403
- ax . transAxes , mtransforms .Affine2D ().scale (10 ) + ax .transData )
404
+ trans = mtransforms .blended_transform_factory (ax . transAxes ,
405
+ mtransforms .Affine2D ().scale (10 ) + ax .transData )
404
406
ax .plot ([0.1 , 1.2 , 0.8 ], [35 , - 5 , 18 ], transform = trans )
405
407
assert_array_equal (ax .dataLim .get_points (),
406
408
np .array ([[np .inf , - 50. ], [- np .inf , 350. ]]))
0 commit comments