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.
(self, event, callback)
| 124 | ) |
| 125 | |
| 126 | def connect_event(self, event, callback): |
| 127 | """ |
| 128 | Connect a callback function with an event. |
| 129 | |
| 130 | This should be used in lieu of ``figure.canvas.mpl_connect`` since this |
| 131 | function stores callback ids for later clean up. |
| 132 | """ |
| 133 | cid = self.canvas.mpl_connect(event, callback) |
| 134 | self._cids.append(cid) |
| 135 | |
| 136 | def disconnect_events(self): |
| 137 | """Disconnect all events created by this widget.""" |
no test coverage detected