From 3ddd94a89cd822039caef3ef12d6852032b96c27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jostein=20B=C3=B8=20Fl=C3=B8ystad?= Date: Mon, 15 Jul 2013 12:29:27 +0200 Subject: [PATCH] unwrap: Simplify example. --- doc/examples/plot_phase_unwrap.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/doc/examples/plot_phase_unwrap.py b/doc/examples/plot_phase_unwrap.py index 258ed21e..85be5fde 100644 --- a/doc/examples/plot_phase_unwrap.py +++ b/doc/examples/plot_phase_unwrap.py @@ -26,26 +26,24 @@ image_unwrapped = exposure.unwrap(image_wrapped) # Plotting plt.figure() -plt.gray() # grayscale colormap as default -imkwargs = dict(vmin=0, vmax=4 * np.pi) plt.subplot(221) plt.title('Original') -plt.imshow(image, **imkwargs) +plt.imshow(image, cmap='gray', vmin=0, vmax=4 * np.pi) plt.colorbar() plt.subplot(222) plt.title('Wrapped phase') -plt.imshow(image_wrapped, vmin=-np.pi, vmax=np.pi) +plt.imshow(image_wrapped, cmap='gray', vmin=-np.pi, vmax=np.pi) plt.colorbar() plt.subplot(223) plt.title('After phase unwrapping') -plt.imshow(image_unwrapped) +plt.imshow(image_unwrapped, cmap='gray') plt.colorbar() plt.subplot(224) plt.title('Unwrapped minus original') -plt.imshow(image_unwrapped - image) +plt.imshow(image_unwrapped - image, cmap='gray') plt.colorbar() plt.show()