Skip to content

Commit e71d50a

Browse files
committed
Merge pull request #4351 from mscross/examples_bayes_update
STY : update example with preferred plt.subplots
2 parents 6586369 + 0510b2b commit e71d50a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

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)