'Connect callback with an event.
This should be used in lieu of `figure.canvas.mpl_connect` since this
function stores callback ids for later clean up.'

def connect_event(self, event, callback):

    cid = self.canvas.mpl_connect(event, callback)
    self.cids.append(cid)
