MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / switch_orientation

Method switch_orientation

lib/matplotlib/collections.py:2005–2015  ·  view source on GitHub ↗

Switch the orientation of the event line, either from vertical to horizontal or vice versus.

(self)

Source from the content-addressed store, hash-verified

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 """

Calls 3

is_horizontalMethod · 0.95
get_segmentsMethod · 0.80
set_segmentsMethod · 0.45