-1

I want to set up a Matlab colormap from white (min values) to green (max values) with any number of shades. I think about a colormap similiar to the summer preset but reversed and with a white edge instead of the yellow one.

Corbjn
  • 276
  • 1
  • 10
  • 2
    Possible duplicate of [How to create a custom colormap programmatically?](https://stackoverflow.com/questions/17230837/how-to-create-a-custom-colormap-programmatically) – codeaviator Dec 08 '17 at 15:54

1 Answers1

0
c = [zeros(64,1)        linspace(0,1,64)'  zeros(64,1);         % black to green
     linspace(0,1,64)'  ones(64,1)         linspace(0,1,64)'];  % green to white


surf(peaks);
colormap(c);
souty
  • 607
  • 3
  • 10