Skip to content

Commit 5e01663

Browse files
committed
Update interpolation_methods.py
1 parent 8ee3f14 commit 5e01663

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

examples/images_contours_and_fields/interpolation_methods.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,13 @@
2020

2121
grid = np.random.rand(4, 4)
2222

23-
fig, ax = plt.subplots(3, 6, figsize=(12, 6),
24-
subplot_kw={'xticks': [], 'yticks': []})
23+
fig, axes = plt.subplots(3, 6, figsize=(12, 6),
24+
subplot_kw={'xticks': [], 'yticks': []})
2525

2626
fig.subplots_adjust(hspace=0.3, wspace=0.05)
2727

28-
ax = ax.ravel()
29-
30-
for ax, interp_method in zip(axes, methods):
31-
ax[n].imshow(grid, interpolation=interp)
32-
ax[n].set_title(interp)
28+
for ax, interp_method in zip(axes.flat, methods):
29+
ax.imshow(grid, interpolation=interp_method)
30+
ax.set_title(interp_method)
3331

3432
plt.show()

0 commit comments

Comments
 (0)