daltonize

Version 1.0.0 (1,35 KB) von phenan08
Automatic colormap adjustment for color-blind users.
10 Downloads
Aktualisiert 3. Dez 2023

Lizenz anzeigen

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") ;

Zitieren als

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

Kompatibilität der MATLAB-Version
Erstellt mit R2023b
Kompatibel mit allen Versionen
Plattform-Kompatibilität
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!
Version Veröffentlicht Versionshinweise
1.0.0