CMAPLINE

apply a colormap to lines in a plot

現在この提出コンテンツをフォロー中です。

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')

引用

Andrew Stevens (2026). CMAPLINE (https://jp.mathworks.com/matlabcentral/fileexchange/21102-cmapline), MATLAB Central File Exchange. に取得済み.

謝辞

ヒントを得たファイル: varycolor

ヒントを与えたファイル: COLORMAP and COLORBAR utilities (Jul 2014)

カテゴリ

Help Center および MATLAB AnswersColor and Styling についてさらに検索

一般的な情報

MATLAB リリースの互換性

  • すべてのリリースと互換性あり

プラットフォームの互換性

  • Windows
  • macOS
  • Linux
バージョン 公開済み リリース ノート Action
1.2.0.0

updated help so that the example will run properly, description