【源码】红蓝颜色映射生成器,零为白色或黑色
a RED-BLUE with zero as white or black.
正值显示为蓝色强度,负值显示为红色强度。
are as blue and are as red .
零可以选择为白色或黑色。
Zero can be to be white or black.
图像中的或可以输入的clim值用于自定义颜色映射。
The clim , from the image or can be , are used to the .
语法:
: y = (n,clim,‘black’)
usage: ((64))
所有参数都是可选的,可以按任何顺序排列。
n——颜色级别数(默认为当前颜色映射的颜色数)
clim——指定颜色限制的双元素向量(默认值:当前轴颜色限制)
black——(‘k’或’black’)指定零为黑色(默认零为白色)
:
All are and can be in any order.
n - of color ( is # of of )
clim - two the color (: axis color )
black - (‘k’ or ‘black’) zero as black ( is zero as white)
该代码将为任何图像创建自定义颜色映射。
This a for any image.
根据图像的caxis值,色条刻度将偏向红色或蓝色。
The scale will be red or blue on the caxis of the image.
两个版本:
.m——这个版本会压平彩色地图的边缘,以改善梯度的可视化。对于较大的n值,效果更好。
.m——这个版本对红色和蓝色使用统一的比例。白色和黑色会出现在更大的部分。
Two :
.m - This the edges of the to the of the . The works for of n.
.m - This uses a for red and blue. The white and black will to be a .
请记住,如果比例非常倾斜,就不会有太多的颜色渐变。使用自己的clim值可以增加渐变。
Keep in mind that if the scale is very , there will not be much of a color . The can be by using your own clim .
示例
% :
% y = caxis; % e.g. y = [-11,-5]
% ((64) % and not much
% ((64,[-11,0])) % white is at -5 with a