Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7828fdf

Browse files
authored
Merge pull request #11188 from timhoffm/interpolation-methods
Fix image size in interpolation example
2 parents d0c2f66 + 31e3b71 commit 7828fdf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

examples/images_contours_and_fields/interpolation_methods.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
grid = np.random.rand(4, 4)
2929

30-
fig, axs = plt.subplots(nrows=3, ncols=6, figsize=(12, 6),
30+
fig, axs = plt.subplots(nrows=3, ncols=6, figsize=(9, 4.5),
3131
subplot_kw={'xticks': [], 'yticks': []})
3232

3333
fig.subplots_adjust(hspace=0.3, wspace=0.05)
@@ -36,4 +36,5 @@
3636
ax.imshow(grid, interpolation=interp_method, cmap='viridis')
3737
ax.set_title(str(interp_method))
3838

39+
plt.tight_layout()
3940
plt.show()

0 commit comments

Comments
 (0)