# Create a new timer object. Set the interval to 100 milliseconds # (1000 is default) and tell the timer what function should be called. timer = fig.canvas.new_timer(interval=100) timer.add_callback(update_title, ax) timer.start()
# Or could start the timer on first figure draw #def start_timer(evt): # timer.start() # fig.canvas.mpl_disconnect(drawid) #drawid = fig.canvas.mpl_connect('draw_event', start_timer)