Question About bar plot
1 次查看(过去 30 天)
显示 更早的评论
hello everyone, I wanted to ask if it is possible in a bar plot of lets say 200 items to make one bar red and keep all the others at their default colors?
采纳的回答
Andrew Newell
2012-1-27
Yes, by splitting your bar plot into two. Here is a simple example:
% First bar plot
xdata = 1:9;
ydata = rand(9,1);
bar(xdata,ydata); hold on
% Second bar plot
xdata = 10;
ydata = rand(1);
bar(xdata,ydata,'FaceColor','r','EdgeColor','r')
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Annotations 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!