mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-04 00:50:31 +08:00
adding shared axes to examples with multiple plots
This commit is contained in:
@@ -70,7 +70,13 @@ img_eq = exposure.equalize_hist(img)
|
||||
img_adapteq = exposure.equalize_adapthist(img, clip_limit=0.03)
|
||||
|
||||
# Display results
|
||||
fig, axes = plt.subplots(nrows=2, ncols=4, figsize=(8, 5))
|
||||
fig = plt.figure(figsize=(8, 5))
|
||||
axes = np.zeros((2,4), dtype=np.object)
|
||||
axes[0,0] = fig.add_subplot(2, 4, 1)
|
||||
for i in range(1,4):
|
||||
axes[0,i] = fig.add_subplot(2, 4, 1+i, sharex=axes[0,0], sharey=axes[0,0])
|
||||
for i in range(0,4):
|
||||
axes[1,i] = fig.add_subplot(2, 4, 5+i)
|
||||
|
||||
ax_img, ax_hist, ax_cdf = plot_img_and_hist(img, axes[:, 0])
|
||||
ax_img.set_title('Low contrast image')
|
||||
|
||||
Reference in New Issue
Block a user