I want to plot a multi color bar graph in Matlab
I have the data
x=[1 2 3]
y=[10 20 30 40]
Please find the attachment and solve the query

 採用された回答

KSSV
KSSV 2022 年 5 月 20 日

1 投票

x=[1 2 3] ;
y=[10 20 30] ;
c = {'r','g','b'} ;
figure
hold on
for i = 1:3
bar(x(i),y(i),c{i})
end

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File Exchange2-D and 3-D Plots についてさらに検索

製品

リリース

R2018a

タグ

質問済み:

2022 年 5 月 20 日

回答済み:

2022 年 5 月 20 日

Community Treasure Hunt

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

Start Hunting!

Translated by