connect_event

LayerSlider.connect_event(event, callback)

Connect a callback function with an event.

This should be used in lieu of figure.canvas.mpl_connect since this function stores callback ids for later clean up.