STY: Fix formatting and use tight_layout in doc examples.

This commit is contained in:
Josh Warner (Mac)
2015-12-07 22:39:35 -07:00
committed by Joshua Warner
parent cc8c3b7687
commit 9b9473c6a1
21 changed files with 88 additions and 73 deletions
@@ -38,7 +38,8 @@ 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, (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')
@@ -52,6 +53,5 @@ 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,
right=1)
fig.tight_layout()
plt.show()