def _connect_callbacks(self):
"""
Connects all of the callbacks for the motion and click events
"""
self._disconnect_callbacks()
self._cur = Cursor(self._im_ax, useblit=True, color='red', linewidth=2)
self._move_cid = self._fig.canvas.mpl_connect('motion_notify_event',
self._move_cb)
self._click_cid = self._fig.canvas.mpl_connect('button_press_event',
self._click_cb)
self._clear_cid = self._fig.canvas.mpl_connect('draw_event',
self._clear)
self._fig.tight_layout()
self._fig.canvas.draw_idle()
评论列表
文章目录