How does colorbar work?
2 次查看(过去 30 天)
显示 更早的评论
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...
0 个评论
采纳的回答
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]);
0 个评论
更多回答(1 个)
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.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Colormaps 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!