| 124 | |
| 125 | |
| 126 | class _ColorbarSpine(mspines.Spine): |
| 127 | def __init__(self, axes): |
| 128 | self._ax = axes |
| 129 | super().__init__(axes, 'colorbar', mpath.Path(np.empty((0, 2)))) |
| 130 | mpatches.Patch.set_transform(self, axes.transAxes) |
| 131 | |
| 132 | def get_window_extent(self, renderer=None): |
| 133 | # This Spine has no Axis associated with it, and doesn't need to adjust |
| 134 | # its location, so we can directly get the window extent from the |
| 135 | # super-super-class. |
| 136 | return mpatches.Patch.get_window_extent(self, renderer=renderer) |
| 137 | |
| 138 | def set_xy(self, xy): |
| 139 | self._path = mpath.Path(xy, closed=True) |
| 140 | self._xy = xy |
| 141 | self.stale = True |
| 142 | |
| 143 | def draw(self, renderer): |
| 144 | ret = mpatches.Patch.draw(self, renderer) |
| 145 | self.stale = False |
| 146 | return ret |
| 147 | |
| 148 | |
| 149 | class _ColorbarAxesLocator: |
no outgoing calls
no test coverage detected
searching dependent graphs…