Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 7f2f375

Browse filesBrowse files
committed
PEP8
1 parent 89365c1 commit 7f2f375
Copy full SHA for 7f2f375

File tree

Expand file treeCollapse file tree

1 file changed

+8
-9
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+8
-9
lines changed

‎lib/matplotlib/image.py

Copy file name to clipboardExpand all lines: lib/matplotlib/image.py
+8-9Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,6 @@ def flush_images():
166166
flush_images()
167167

168168

169-
170169
def _rgb_to_rgba(A):
171170
"""
172171
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,
333332
+ self.get_transform())
334333

335334
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))
340339

341340
# So that the image is aligned with the edge of the axes, we want
342341
# 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,
12131212

12141213
# Fast path for saving to PNG
12151214
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')):
12181217
image = AxesImage(None, cmap=cmap, origin=origin)
12191218
image.set_data(arr)
12201219
image.set_clim(vmin, vmax)
12211220
image.write_png(fname)
12221221
else:
12231222
fig = Figure(dpi=dpi, frameon=False)
1224-
canvas = FigureCanvas(fig)
1223+
FigureCanvas(fig)
12251224
fig.figimage(arr, cmap=cmap, vmin=vmin, vmax=vmax, origin=origin,
12261225
resize=True)
12271226
fig.savefig(fname, dpi=dpi, format=format, transparent=True)
@@ -1350,7 +1349,7 @@ def thumbnail(infile, thumbfile, scale=0.1, interpolation='bilinear',
13501349

13511350
from matplotlib.figure import Figure
13521351
fig = Figure(figsize=(width, height), dpi=dpi)
1353-
canvas = FigureCanvas(fig)
1352+
FigureCanvas(fig)
13541353

13551354
ax = fig.add_axes([0, 0, 1, 1], aspect='auto',
13561355
frameon=False, xticks=[], yticks=[])

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.