Question About bar plot

1 回表示 (過去 30 日間)
Raldi
Raldi 2012 年 1 月 27 日
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?
  1 件のコメント
Andrew Newell
Andrew Newell 2012 年 1 月 27 日
Do you want 200 bars?

サインインしてコメントする。

採用された回答

Andrew Newell
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')
  1 件のコメント
Raldi
Raldi 2012 年 1 月 27 日
Thanks Andrew

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeAnnotations についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by