From 0510b2b0b4faeed8b2cfd2c1405558e610483981 Mon Sep 17 00:00:00 2001 From: Mellissa Cross Date: Sat, 18 Apr 2015 20:44:39 -0500 Subject: [PATCH] STY: update example with preferred plt.subplots --- examples/animation/bayes_update.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/examples/animation/bayes_update.py b/examples/animation/bayes_update.py index a05930562512..4276e62b864f 100644 --- a/examples/animation/bayes_update.py +++ b/examples/animation/bayes_update.py @@ -40,8 +40,7 @@ def __call__(self, i): self.line.set_data(self.x, y) return self.line, -fig = plt.figure() -ax = fig.add_subplot(1, 1, 1) +fig, ax = plt.subplots() ud = UpdateDist(ax, prob=0.7) anim = FuncAnimation(fig, ud, frames=np.arange(100), init_func=ud.init, interval=100, blit=True)