Switch the orientation of the event line, either from vertical to horizontal or vice versus.
(self)
| 2003 | return 'horizontal' if self.is_horizontal() else 'vertical' |
| 2004 | |
| 2005 | def switch_orientation(self): |
| 2006 | """ |
| 2007 | Switch the orientation of the event line, either from vertical to |
| 2008 | horizontal or vice versus. |
| 2009 | """ |
| 2010 | segments = self.get_segments() |
| 2011 | for i, segment in enumerate(segments): |
| 2012 | segments[i] = np.fliplr(segment) |
| 2013 | self.set_segments(segments) |
| 2014 | self._is_horizontal = not self.is_horizontal() |
| 2015 | self.stale = True |
| 2016 | |
| 2017 | def set_orientation(self, orientation): |
| 2018 | """ |