def scale(self, vmin=0., vmax=1.):
        """Transforms the colorscale so that the minimal and maximal values
        fit the given parameters.
        """
        return LinearColormap(
            self.colors,
            index=[vmin + (vmax-vmin)*(x-self.vmin)*1./(self.vmax-self.vmin) for x in self.index],  # noqa
            vmin=vmin,
            vmax=vmax,
            )
def scale ( self , vmin = 0. , vmax = 1. ) : return LinearColormap ( self . colors , index = [ vmin + ( vmax - vmin ) * ( x - self . vmin ) * 1. / ( self . vmax - self . vmin ) for x in self . index ] , vmin = vmin , vmax = vmax , )
Transforms the colorscale so that the minimal and maximal values
        fit the given parameters.