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