if self.extend in ("both", "min"):
self._levels.insert(0, min(self.levels[0], self.zmin) - 1)
if self.extend in ("both", "max"):
self._levels.append(max(self.levels[-1], self.zmax) + 1)
self._levels = np.asarray(self._levels)
if not self.filled:
After Change
// Layer values are mid-way between levels in screen space.
if self.logscale:
// Avoid overflow by taking sqrt before multiplying.
self.layers = (np.sqrt(self._levels[:-1])
* np.sqrt(self._levels[1:]))
else:
self.layers = 0.5 * (self._levels[:-1] + self._levels[1:])
def _process_colors(self):