MATLAB 帮助中心
本页翻译不是最新的。点击此处可查看最新英文版本。
Abyss 颜色图数组
自 R2023b 起
c = abyss
c = abyss(m)
c = abyss 以三列数组形式返回 abyss 颜色图,该数组包含的行数与当前图窗 (gcf) 的颜色图相同。如果不存在图窗,则行数等于默认长度 256。数组中的每一行包含一种特定颜色的红、绿、蓝强度。强度介于 [0, 1] 范围内,颜色方案如下图所示。
gcf
示例
c = abyss(m) 返回包含 m 种颜色的颜色图。
m
全部折叠
显示 membrane 函数的图像。
membrane
imagesc(membrane)
将颜色图更改为 abyss。
abyss
colormap abyss
默认情况下,热图使用 sky 颜色图的 256 采样。您可以通过指定 heatmap 函数的 Colormap 名称-值参量来更改颜色图和采样。
sky
heatmap
Colormap
例如,在 2×1 分块图布局中创建两个热图。上图使用 abyss 颜色图的 256 种颜色,下图仅使用两种颜色。
tiledlayout(2,1) % Top chart with default number of colors nexttile cdata = magic(10); heatmap(cdata,Colormap=abyss) title("256 Colors") % Bottom chart with two colors nexttile heatmap(cdata,Colormap=abyss(2)) title("2 Colors")
256
颜色数,指定为非负整数。m 的默认值为当前图窗的颜色图中的颜色数。如果不存在图窗,则默认值为 256。
数据类型: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64
single
double
int8
int16
int32
int64
uint8
uint16
uint32
uint64
在 R2023b 中推出
colormap
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
选择网站
选择网站以获取翻译的可用内容,以及查看当地活动和优惠。根据您的位置,我们建议您选择:。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
欧洲
亚太
联系您当地的办事处