turbo
说明
示例
反转颜色图
绘制曲面,并分配 turbo 颜色图。
surf(peaks);
colormap('turbo');
获取 turbo 颜色图数组,并反转顺序。然后将修改后的颜色图应用于该曲面。
c = turbo; c = flipud(c); colormap(c);
下采样颜色图
获取仅包含十种颜色的下采样 turbo 颜色图。然后通过应用颜色图和插补着色,显示 peaks
函数的轮廓。
c = turbo(10);
surf(peaks);
colormap(c);
shading interp;
比较 Jet 和 Turbo 颜色图
创建一个包含 peaks
数据集的两个伪彩图的分块图布局。左图使用 jet 颜色图,右图使用 turbo 颜色图。请注意,turbo 图中颜色之间的转换较 jet 图中更为柔和。
t = tiledlayout(1,2); [X,Y,Z] = peaks; % Left image ax1 = nexttile; s1 = pcolor(ax1,X,Y,Z); s1.EdgeColor = 'none'; s1.FaceColor = 'interp'; ax1.Colormap = jet; title(ax1,'Jet'); % Right image ax2 = nexttile; s2 = pcolor(ax2,X,Y,Z); s2.EdgeColor = 'none'; s2.FaceColor = 'interp'; ax2.Colormap = turbo; title(ax2,'Turbo');
输入参数
m
— 颜色数
256
(默认) | 非负整数
颜色数,指定为非负整数。m
的默认值为当前图窗的颜色图中的颜色数。如果不存在图窗,则默认值为 256
。
数据类型: single
| double
版本历史记录
在 R2020b 中推出
另请参阅
MATLAB 命令
您点击的链接对应于以下 MATLAB 命令:
请在 MATLAB 命令行窗口中直接输入以执行命令。Web 浏览器不支持 MATLAB 命令。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)