介绍几个适用于matlab的colormap

编程入门 行业动态 更新时间:2024-10-28 08:20:19

介绍<a href=https://www.elefans.com/category/jswz/34/1769605.html style=几个适用于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

本文发布于:2024-03-23 21:05:32,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1742806.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:几个   适用于   colormap   matlab

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!