diff --git a/doc/examples/plot_adapt_rgb.py b/doc/examples/plot_adapt_rgb.py index e349d35d..f6aca943 100644 --- a/doc/examples/plot_adapt_rgb.py +++ b/doc/examples/plot_adapt_rgb.py @@ -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")