Fix style (pep8)

This commit is contained in:
Nicolas Rougier
2015-08-30 09:35:44 +02:00
parent 21f655edf7
commit 6c421cd366
+4 -4
View File
@@ -47,7 +47,7 @@ import matplotlib.pyplot as plt
image = data.astronaut()
fig = plt.figure( figsize=(14,7) )
fig = plt.figure(figsize=(14, 7))
ax_each = fig.add_subplot(121)
ax_hsv = fig.add_subplot(122)
@@ -57,7 +57,7 @@ ax_each.set_xticks([]), ax_each.set_yticks([])
ax_each.set_title("Sobel filter computed\n on individual RGB channels")
# We use 1 - sobel_hsv(image) but this will not work if image is not normalized
ax_hsv.imshow( rescale_intensity((1-sobel_hsv(image))))
ax_hsv.imshow(rescale_intensity(1 - sobel_hsv(image)))
ax_hsv.set_xticks([]), ax_hsv.set_yticks([])
ax_hsv.set_title("Sobel filter computed\n on (V)alue converted image (HSV)")
@@ -105,11 +105,11 @@ Finally, we can use this handler with ``adapt_rgb`` just as before:
def sobel_gray(image):
return filters.sobel(image)
fig = plt.figure( figsize=(7,7) )
fig = plt.figure(figsize=(7, 7))
ax = fig.add_subplot(111)
# We use 1 - sobel_gray(image) but this will not work if image is not normalized
ax.imshow( rescale_intensity(1-sobel_gray(image)), cmap=plt.cm.gray)
ax.imshow( rescale_intensity(1 - sobel_gray(image)), cmap=plt.cm.gray)
ax.set_xticks([]), ax.set_yticks([])
ax.set_title("Sobel filter computed\n on the converted grayscale image")