Get the bounds of the spine. If self._bounds is None, return self.axes.viewLim.intervalx or self.axes.viewLim.intervaly based on self.spine_type
(self)
| 233 | self._position = None # clear position |
| 234 | |
| 235 | def _get_bounds_or_viewLim(self): |
| 236 | """ |
| 237 | Get the bounds of the spine. |
| 238 | |
| 239 | If self._bounds is None, return self.axes.viewLim.intervalx |
| 240 | or self.axes.viewLim.intervaly based on self.spine_type |
| 241 | """ |
| 242 | if self._bounds is not None: |
| 243 | low, high = self._bounds |
| 244 | elif self.spine_type in ('left', 'right'): |
| 245 | low, high = self.axes.viewLim.intervaly |
| 246 | elif self.spine_type in ('top', 'bottom'): |
| 247 | low, high = self.axes.viewLim.intervalx |
| 248 | else: |
| 249 | raise ValueError(f'spine_type: {self.spine_type} not supported') |
| 250 | return low, high |
| 251 | |
| 252 | def _adjust_location(self): |
| 253 | """Automatically set spine bounds to the view interval.""" |
no outgoing calls
no test coverage detected