mirror of
https://github.com/wassname/scikit-image.git
synced 2026-08-11 11:25:30 +08:00
adding axes sharing to displays of related images
for better interaction sharing achieved by setting sharex and sharey, and setting the axes 'adjustable' parameter to 'box-forced'
This commit is contained in:
@@ -34,7 +34,10 @@ print(shift)
|
||||
# pixel precision first
|
||||
shift, error, diffphase = register_translation(image, offset_image)
|
||||
|
||||
fig, (ax1, ax2, ax3) = plt.subplots(ncols=3, figsize=(8, 3))
|
||||
fig = plt.figure(figsize=(8, 3))
|
||||
ax1 = plt.subplot(1, 3, 1, adjustable='box-forced')
|
||||
ax2 = plt.subplot(1, 3, 2, sharex=ax1, sharey=ax1, adjustable='box-forced')
|
||||
ax3 = plt.subplot(1, 3, 3)
|
||||
|
||||
ax1.imshow(image)
|
||||
ax1.set_axis_off()
|
||||
@@ -60,7 +63,10 @@ print(shift)
|
||||
# subpixel precision
|
||||
shift, error, diffphase = register_translation(image, offset_image, 100)
|
||||
|
||||
fig, (ax1, ax2, ax3) = plt.subplots(ncols=3, figsize=(8, 3))
|
||||
fig = plt.figure(figsize=(8, 3))
|
||||
ax1 = plt.subplot(1, 3, 1, adjustable='box-forced')
|
||||
ax2 = plt.subplot(1, 3, 2, sharex=ax1, sharey=ax1, adjustable='box-forced')
|
||||
ax3 = plt.subplot(1, 3, 3)
|
||||
|
||||
ax1.imshow(image)
|
||||
ax1.set_axis_off()
|
||||
|
||||
Reference in New Issue
Block a user