'switch the orientation of the event line, either from vertical to
horizontal or vice versus'

def switch_orientation(self):

    segments = self.get_segments()
    for (i, segment) in enumerate(segments):
        segments[i] = np.fliplr(segment)
    self.set_segments(segments)
    self._is_horizontal = (not self.is_horizontal())
    self.stale = True
