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

Method set_lineoffset

lib/matplotlib/collections.py:2053–2064  ·  view source on GitHub ↗

Set the offset of the lines used to mark each event.

(self, lineoffset)

Source from the content-addressed store, hash-verified

2051 return self._lineoffset
2052
2053 def set_lineoffset(self, lineoffset):
2054 """Set the offset of the lines used to mark each event."""
2055 if lineoffset == self.get_lineoffset():
2056 return
2057 linelength = self.get_linelength()
2058 segments = self.get_segments()
2059 pos = 1 if self.is_horizontal() else 0
2060 for segment in segments:
2061 segment[0, pos] = lineoffset + linelength / 2.
2062 segment[1, pos] = lineoffset - linelength / 2.
2063 self.set_segments(segments)
2064 self._lineoffset = lineoffset
2065
2066 def get_linewidth(self):
2067 """Get the width of the lines used to mark each event."""

Callers 1

Calls 5

get_lineoffsetMethod · 0.95
get_linelengthMethod · 0.95
is_horizontalMethod · 0.95
get_segmentsMethod · 0.80
set_segmentsMethod · 0.45

Tested by 1