Set the offset of the lines used to mark each event.
(self, lineoffset)
| 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.""" |