Skip to content

Commit ebfe80d

Browse files
committed
MNT: change cmap to viridis + animate=True flag
1 parent dd1d727 commit ebfe80d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

examples/animation/dynamic_image.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def f(x, y):
1515
x = np.linspace(0, 2 * np.pi, 120)
1616
y = np.linspace(0, 2 * np.pi, 100).reshape(-1, 1)
1717

18-
im = plt.imshow(f(x, y), cmap=plt.get_cmap('jet'))
18+
im = plt.imshow(f(x, y), cmap=plt.get_cmap('viridis'), animated=True)
1919

2020

2121
def updatefig(*args):

examples/animation/dynamic_image2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def f(x, y):
2121
for i in range(60):
2222
x += np.pi / 15.
2323
y += np.pi / 20.
24-
im = plt.imshow(f(x, y))
24+
im = plt.imshow(f(x, y), cmap='viridis', animated=True)
2525
ims.append([im])
2626

2727
ani = animation.ArtistAnimation(fig, ims, interval=50, blit=True,

0 commit comments

Comments
 (0)