CMAPLINE

apply a colormap to lines in a plot
2,4K download
Aggiornato 29 ott 2008

Visualizza la licenza

CMAPLINE finds all lines in an axis and specifies their colors according to a colormap. Also accepts custom colormaps in the form of a n x 3 matrix.

EXAMPLE (generates screenshot)

%generate some data
x=(0:0.1:2*pi);
m=50; exdata=bsxfun(@plus,repmat(25.*sin(x),...
[m 1]),[1:m]');

figure
subplot(121);
plot(x,exdata,'o-','linewidth',2)
cmapline('colormap','jet');
set(gca,'color','k')
title('jet colormap')

subplot(122);
plot(x,exdata,'o-','linewidth',2)
custommap=flipud(hot);
cmapline('colormap',custommap,'filled')
set(gca,'color','k')
title('reverse hot colormap, filled markers')

Cita come

Andrew Stevens (2026). CMAPLINE (https://it.mathworks.com/matlabcentral/fileexchange/21102-cmapline), MATLAB Central File Exchange. Recuperato .

Compatibilità della release di MATLAB
Creato con R2008a
Compatibile con qualsiasi release
Compatibilità della piattaforma
Windows macOS Linux
Categorie
Scopri di più su Color and Styling in Help Center e MATLAB Answers
Riconoscimenti

Ispirato da: varycolor

Ispirato: COLORMAP and COLORBAR utilities (Jul 2014)

Versione Pubblicato Note della release
1.2.0.0

updated help so that the example will run properly, description