Skip to content

Commit c9cae50

Browse files
committed
Update interpolation_methods.py to use viridis
1 parent 3b7d1bb commit c9cae50

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

examples/images_contours_and_fields/interpolation_methods.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
'spline36', 'hanning', 'hamming', 'hermite', 'kaiser', 'quadric',
1919
'catrom', 'gaussian', 'bessel', 'mitchell', 'sinc', 'lanczos']
2020

21+
np.random.seed(0)
2122
grid = np.random.rand(4, 4)
2223

2324
fig, axes = plt.subplots(3, 6, figsize=(12, 6),
@@ -26,7 +27,7 @@
2627
fig.subplots_adjust(hspace=0.3, wspace=0.05)
2728

2829
for ax, interp_method in zip(axes.flat, methods):
29-
ax.imshow(grid, interpolation=interp_method)
30+
ax.imshow(grid, interpolation=interp_method, cmap='viridis')
3031
ax.set_title(interp_method)
3132

32-
plt.show()
33+
plt.savefig("test.png")

0 commit comments

Comments
 (0)