code: def to_linear(self, index=None):
          if index is None:
              n = len(self.index)-1
              index = [self.index[i]*(1.-i/(n-1.))+self.index[i+1]*i/(n-1.) for
                       i in range(n)]
          colors = [self.rgba_floats_tuple(x) for x in index]
          return LinearColormap(colors, index=index,
                                vmin=self.vmin, vmax=self.vmax)