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

Class _ColorbarSpine

lib/matplotlib/colorbar.py:126–146  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

124
125
126class _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
149class _ColorbarAxesLocator:

Callers 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…