def connect(self):
        self.cidpress_click = self.fig.figure.canvas.mpl_connect('button_press_event', self.on_press)
        self.cidscroll = self.fig.figure.canvas.mpl_connect('scroll_event', self.on_scroll)
        self.cidrelease = self.fig.figure.canvas.mpl_connect('button_release_event', self.on_release)
        self.cidmotion = self.fig.figure.canvas.mpl_connect('motion_notify_event', self.on_motion)
connect to all the events we need
dataset/ETHPy150Open neuropoly/spinalcordtoolbox/scripts/sct_viewer.py/SinglePlot.connect