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

Skip to content

Commit 0510b2b

Browse files
committed
STY: update example with preferred plt.subplots
1 parent 6586369 commit 0510b2b

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

examples/animation/bayes_update.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,7 @@ def __call__(self, i):
4040
self.line.set_data(self.x, y)
4141
return self.line,
4242

43-
fig = plt.figure()
44-
ax = fig.add_subplot(1, 1, 1)
43+
fig, ax = plt.subplots()
4544
ud = UpdateDist(ax, prob=0.7)
4645
anim = FuncAnimation(fig, ud, frames=np.arange(100), init_func=ud.init,
4746
interval=100, blit=True)

0 commit comments

Comments
 (0)