MATLAB: How to set a fixed color scheme for pcolor

cdatacolorfixedpcolorscale

I'm making a graph of measurements, and pcolor is a very good way to display these data, but everytime the data is slightly different, the color scheme changes, which is annoying. I've tried some solutions with CData, but my inexperience has left me frustrated and with no solution when I try to extrapolate how to use CData based on other people's questions.
Basically, I want the colors to be the same every time in terms of order, not number, (.0143in can't always be blue, but blue always has to be the largest number).
Any help would be great. Here's my current code for the graph:
"figure
pcolor(postnomtable)
colorbar"
where postnomtable is an m by m matrix

Best Answer

You do know that the colors depend not on the value of a particular element, but on the slope of a plane fitted between the 4 elements at the corner, don't you? Did you see this in the help: "With shading interp, each cell is colored by bilinear interpolation of the colors at its four vertices, using all elements of C." And you know that you're "missing" the last row and column because you read this: "The last row and column of C are not used" What is the exact call to pcolor that you used? Then, explain to me why you want to use pcolor() instead of imshow() or image().
Anyway, if you want blue to be the largest value, just flip jet. See this demo:
m = randi(3, [5 5])
pcolor(m)
flippedJetColorMap = flipud(jet(256));
colormap(flippedJetColorMap);
colorbar
Whoa! Wait a minute! Did you notice that all the 1's don't have the same color, and all the 2's don't have the same color, and that all the 3's don't have the same color? And did you notice that there are only 4 by 4 cells displayed, not 5 by 5 like the size of my "m" matrix? That doesn't seem intuitive! Now you know why I don't recommend pcolor. But at least the colormap is flipped like you want, though it doesn't really apply to anything.