daltonize

版本 1.0.0 (1.3 KB) 作者: phenan08
Automatic colormap adjustment for color-blind users.
10.0 次下载
更新时间 2023/12/3

查看许可证

This function automatically converts any colormap supplied as an argument into a color-blind-friendly colormap, by adjusting color saturation.
Example of use:
N = 5 ;
colors = parula(N) ;
x = [1:5]' ;
figure("Position",[100 100 400 300]) ;
for i = 1:N
plot(x,i*x,"-o","Color",colors(i,:),"LineWidth",2,"MarkerFaceColor",colors(i,:)) ;
hold on ;
end
hold off ;
title("Figure with original parula colormap") ;
colors2 = daltonize(parula(N)) ;
figure("Position",[100 100 400 300]) ;
for i = 1:N
plot(x,i*x,"-o","Color",colors2(i,:),"LineWidth",2,"MarkerFaceColor",colors2(i,:)) ;
hold on ;
end
hold off ;
title("Figure with adjusted parula colormap") ;

引用格式

phenan08 (2024). daltonize (https://www.mathworks.com/matlabcentral/fileexchange/155929-daltonize), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2023b
兼容任何版本
平台兼容性
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明
1.0.0