how to customize a colorbar?
2 次查看(过去 30 天)
显示 更早的评论
Hi,
I try to plot a colorbar next to a plot but to show a color corresponding to the value of the function at that position instead of the range of the colors/values. So I want a layout similar to this:
plot(smooth(rand(1,100), 10));
colorbar('location','southoutside')
But with colors changind according to the value of the function. Any hints?
Thanks
0 个评论
采纳的回答
更多回答(1 个)
Doug Hull
2013-4-3
Colorbar should not have any bearing on a line plot. Maybe you mean the 'colororder' property of the axes:
>> get(gca, 'colororder')
ans =
0 0 1.0000
0 0.5000 0
1.0000 0 0
0 0.7500 0.7500
0.7500 0 0.7500
0.7500 0.7500 0
0.2500 0.2500 0.2500
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Orange 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!