diff --git a/doc/examples/plot_random_walker_segmentation.py b/doc/examples/plot_random_walker_segmentation.py index 8413a5a6..81e0bd91 100644 --- a/doc/examples/plot_random_walker_segmentation.py +++ b/doc/examples/plot_random_walker_segmentation.py @@ -38,18 +38,18 @@ markers[data > 1.3] = 2 labels = random_walker(data, markers, beta=10, mode='bf') # Plot results -fig = plt.figure(figsize=(8, 3.2)) -ax1 = plt.subplot(1, 3, 1, adjustable='box-forced') +fig, (ax1, ax2, ax3) = plt.subplots(1, 3, figsize=(8, 3.2), sharex=True, sharey=True) ax1.imshow(data, cmap='gray', interpolation='nearest') ax1.axis('off') +ax1.set_adjustable('box-forced') ax1.set_title('Noisy data') -ax2 = plt.subplot(1, 3, 2, sharex=ax1, sharey=ax1, adjustable='box-forced') ax2.imshow(markers, cmap='hot', interpolation='nearest') ax2.axis('off') +ax2.set_adjustable('box-forced') ax2.set_title('Markers') -ax3 = plt.subplot(1, 3, 3, sharex=ax1, sharey=ax1, adjustable='box-forced') ax3.imshow(labels, cmap='gray', interpolation='nearest') ax3.axis('off') +ax3.set_adjustable('box-forced') ax3.set_title('Segmentation') fig.subplots_adjust(hspace=0.01, wspace=0.01, top=1, bottom=0, left=0,