How does colorbar work?

조회 수: 1 (최근 30일)
sadel
sadel 2011년 6월 4일
How does colorbar work?
I have a gui with axes and a toolbar with colorbar and I want to plot many plots with "hold" command but I don't know how to use it to paint with different color every line...

채택된 답변

Jan
Jan 2011년 6월 4일
As far as I understand, this is not a task for COLORBAR. Perhaps this helps:
plot(1:10, rand(1, 10), 'Color', [1,0,0]);
hold on
plot(2:11, rand(1, 10), 'Color', [1,1,0]);
plot(3:12, rand(1, 10), 'Color', [1,0,1]);
plot(1:10, rand(1, 10), 'Color', [0.5,0.5,0]);

추가 답변 (1개)

Walter Roberson
Walter Roberson 2011년 6월 4일
Jan is correct that colorbar() has nothing to do with that task. The axis property ColorOrder is what is appropriate. Please see this guide on how to use it.

카테고리

Help CenterFile Exchange에서 Colormaps에 대해 자세히 알아보기

태그

아직 태그를 입력하지 않았습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by