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:
martin
2015-10-12 15:58:57 +02:00
parent 8ff6d2d8e3
commit 9fa9c0387c
24 changed files with 105 additions and 54 deletions
+1 -1
View File
@@ -26,7 +26,7 @@ image_wrapped = np.angle(np.exp(1j * image))
# Perform phase unwrapping
image_unwrapped = unwrap_phase(image_wrapped)
fig, ax = plt.subplots(2, 2)
fig, ax = plt.subplots(2, 2, sharex=True, sharey=True, subplot_kw={'adjustable':'box-forced'})
ax1, ax2, ax3, ax4 = ax.ravel()
fig.colorbar(ax1.imshow(image, cmap='gray', vmin=0, vmax=4 * np.pi), ax=ax1)