Reputation: 9844
I'm trying to run the example provided here, for a custom data.
Calling the same piece of code showed in the given example generates 4 images where the first one is smaller than the others:
plt.subplot(221)
plt.axis('off')
plt.imshow(rs.T, extent=(0,xsteps,0,ysteps), origin='lower')
plt.plot(points[:, 0], points[:, 1], 'k.', ms=1)
plt.title('Original')
plt.subplot(222)
plt.axis('off')
plt.imshow(grid_z0.T, origin='lower')
plt.title('Nearest')
plt.subplot(223)
plt.axis('off')
plt.imshow(grid_z1.T, origin='lower')
plt.title('Linear')
plt.subplot(224)
plt.axis('off')
plt.imshow(grid_z2.T, origin='lower')
plt.title('Cubic')
plt.gcf().set_size_inches(6, 6)
plt.show()
If I comment the plt.plot
call after displaying the first image, all plots end having the same size.
I'm wondering how to display the points and keep the same scale for all images.
Upvotes: 1
Views: 496