You are now following this Submission
- You will see updates in your followed content feed
- You may receive emails, depending on your communication preferences
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')
Cite As
Andrew Stevens (2026). CMAPLINE (https://ch.mathworks.com/matlabcentral/fileexchange/21102-cmapline), MATLAB Central File Exchange. Retrieved .
General Information
- Version 1.2.0.0 (2.5 KB)
MATLAB Release Compatibility
- Compatible with any release
Platform Compatibility
- Windows
- macOS
- Linux
| Version | Published | Release Notes | Action |
|---|---|---|---|
| 1.2.0.0 | updated help so that the example will run properly, description |
