Filter löschen
Filter löschen

How does colorbar work?

1 Ansicht (letzte 30 Tage)
sadel
sadel am 4 Jun. 2011
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...

Akzeptierte Antwort

Jan
Jan am 4 Jun. 2011
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]);

Weitere Antworten (1)

Walter Roberson
Walter Roberson am 4 Jun. 2011
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.

Kategorien

Mehr zu Colormaps finden Sie in Help Center und File Exchange

Tags

Noch keine Tags eingegeben.

Community Treasure Hunt

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

Start Hunting!

Translated by