matlab-colormap

A colormap is a matrix of values that define the colors for graphics objects such as surface, image, and patch objects. MATLAB® draws the objects by mapping data values to colors in the colormap.

简单来说,colormap就是一种绘图色表。是用来给无颜色图表上色的。例如地形图,高的部分用红的,低的用蓝色。因此它把预设好的颜色和图表中的其他信息建立映射,在地形图里体现为高度和颜色的映射。这也是colormap中map的由来。

这个映射只能映射一维信息,因为colormap本身是四维的矩阵,颜色占了三维,剩下只能关联一维。

原文地址:https://www.cnblogs.com/aliothx/p/14244782.html