@@ -166,7 +166,6 @@ def flush_images():
166
166
flush_images ()
167
167
168
168
169
-
170
169
def _rgb_to_rgba (A ):
171
170
"""
172
171
Convert an RGB image to RGBA, as required by the image resample C++
@@ -333,10 +332,10 @@ def _make_image(self, A, in_bbox, out_bbox, clip_bbox, magnification=1.0,
333
332
+ self .get_transform ())
334
333
335
334
t = (t0
336
- + Affine2D ().translate (
337
- - clipped_bbox .x0 ,
338
- - clipped_bbox .y0 )
339
- .scale (magnification , magnification ))
335
+ + Affine2D ().translate (
336
+ - clipped_bbox .x0 ,
337
+ - clipped_bbox .y0 )
338
+ .scale (magnification , magnification ))
340
339
341
340
# So that the image is aligned with the edge of the axes, we want
342
341
# to round up the output width to the next integer. This also
@@ -1213,15 +1212,15 @@ def imsave(fname, arr, vmin=None, vmax=None, cmap=None, format=None,
1213
1212
1214
1213
# Fast path for saving to PNG
1215
1214
if (format == 'png' or format is None or
1216
- isinstance (fname , six .string_types ) and
1217
- fname .lower ().endswith ('.png' )):
1215
+ isinstance (fname , six .string_types ) and
1216
+ fname .lower ().endswith ('.png' )):
1218
1217
image = AxesImage (None , cmap = cmap , origin = origin )
1219
1218
image .set_data (arr )
1220
1219
image .set_clim (vmin , vmax )
1221
1220
image .write_png (fname )
1222
1221
else :
1223
1222
fig = Figure (dpi = dpi , frameon = False )
1224
- canvas = FigureCanvas (fig )
1223
+ FigureCanvas (fig )
1225
1224
fig .figimage (arr , cmap = cmap , vmin = vmin , vmax = vmax , origin = origin ,
1226
1225
resize = True )
1227
1226
fig .savefig (fname , dpi = dpi , format = format , transparent = True )
@@ -1350,7 +1349,7 @@ def thumbnail(infile, thumbfile, scale=0.1, interpolation='bilinear',
1350
1349
1351
1350
from matplotlib .figure import Figure
1352
1351
fig = Figure (figsize = (width , height ), dpi = dpi )
1353
- canvas = FigureCanvas (fig )
1352
+ FigureCanvas (fig )
1354
1353
1355
1354
ax = fig .add_axes ([0 , 0 , 1 , 1 ], aspect = 'auto' ,
1356
1355
frameon = False , xticks = [], yticks = [])
0 commit comments