0
votes

enter image description here]1

In this graph I want to change the surface colors. I want to represent the area in red by blue and the area in blue by red. So in the scale values closer to 1, would be represented by blue color and values closer to 0 by red color. How can I make this adjustment?

1

1 Answers

1
votes

You can manually modify the colormap to make the adjustment. Let's take an example using the jet colormap.

Here's the original figure:

figure;
surf(peaks);

original with jet

Now we take a jet colormap with 128 values, flip it and assign it to the axes:

cmap = jet(128); %// get colormap you want
cmap = flipud(cmap); %// flip colormap
colormap(cmap); %//assign colormap

Which has the effect desired, blue colour is shown for large values and red for small:

enter image description here