How can I get a colormap that has the colors that varies smoothly from blue, through white, to red?

30 次查看(过去 30 天)
I want to use a colormap for my contour plot that looks like the built-in colormap 'Jet', but I do not want the scale to contain the color green, but white instead. Can somebody help me?

采纳的回答

Kevin Claytor
Kevin Claytor 2012-7-18
编辑:Kevin Claytor 2012-7-18
There's a programmatic way of doing it, but this is the GUI point and click method; Right click on the colorbar -> Open Colormap Editor The colorbar will appear as a horizontal stripe with little flags below it. Double click the green flag. This brings up a color selection window, pick white and go OK.
To do this automatically in the future you can save the colormap with;
myColormap = colormap;
save('colormapsavefile.mat','myColormap');
To apply;
load('colormapsavefile.mat');
colormap(myColormap);
With some tweaking you can set the default colormap using this method and the startup.m file.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Colormaps 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by