几个适用于matlab的colormap"/>
介绍几个适用于matlab的colormap
matlab自带的colormap不好看,在matlab的App市场找到了一些插件,挺不错的,介绍给大家。
插件名称:
1:MatPlotLib Perceptually Uniform Colormaps
2:cmocean perceptually-uniform colormaps
3:CubeHelix Colormap Generator: Beautiful and Versatile!
获取方式:
准备matlab账号,密码
matlab->app->安装app->搜索工具->获取或者安装即可
1:MatPlotLib Perceptually Uniform Colormaps
演示简单调用
函数:cividis,inferno,magma,plasma,tab10,tab20,tab20b,tab20c,twilight,twilight_shifted,virids
2:cmocean perceptually-uniform colormaps
函数:cmocean
3:CubeHelix Colormap Generator: Beautiful and Versatile!
函数:cubehelix,cubehelix_view,preset_colormap
cubehelix_view这个函数还挺好玩的,可以自己设置,提前预览,互动性很强
preset_colormap有点复杂,没搞明白
clc;clear ;close all;
x=1:10;
x=x';
t=1:0.1:19;
y=x.*sin(t);
figure
hp=plot(t,y);
% clr=jet(length(hp));%可以看之前的视频,有介绍多条曲线调节颜色的
% clr=tab10(length(hp));%length(hp)是由曲线条数决定的
% clr=tab20(length(hp));
% clr=tab20b(length(hp));
% clr=tab20c(length(hp));
% clr=cubehelix(length(hp))
% [map,lo,hi,prm] = cubehelix(N,start,rots,satn,gamma,irange,domain)
[clr,ho,li]=cubehelix_view(length(hp));%这个最好玩,玩起来停不下来,哈哈
% %可以直接保存clr用于以后的绘图,也可以记住界面上的参数,使用下面的命令调用
% % [map,lo,hi,prm] = cubehelix(N,start,rots,satn,gamma,irange,domain)
for i=1:length(hp)hp(i).Color=clr(i,:);hp(i).LineWidth=2;
end
legend
更多推荐
介绍几个适用于matlab的colormap
发布评论