changed adjustable parameter of axes to 'box-forced'

this fixes the size of axes around an image for shared axes
This commit is contained in:
martin
2015-09-08 18:02:42 +02:00
parent 681be3fc58
commit 8ff6d2d8e3
11 changed files with 74 additions and 74 deletions
@@ -38,13 +38,16 @@ markers[data > 1.3] = 2
labels = random_walker(data, markers, beta=10, mode='bf')
# Plot results
fig, (ax1, ax2, ax3) = plt.subplots(1, 3, figsize=(8, 3.2), sharex=True, sharey=True)
fig = plt.figure(figsize=(8, 3.2))
ax1 = plt.subplot(1, 3, 1, adjustable='box-forced')
ax1.imshow(data, cmap='gray', interpolation='nearest')
ax1.axis('off')
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_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_title('Segmentation')