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

 Akzeptierte Antwort

KSSV
KSSV am 20 Mai 2022

1 Stimme

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

Weitere Antworten (0)

Kategorien

Mehr zu 2-D and 3-D Plots finden Sie in Hilfe-Center und File Exchange

Produkte

Version

R2018a

Gefragt:

am 20 Mai 2022

Beantwortet:

am 20 Mai 2022

Community Treasure Hunt

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

Start Hunting!

Translated by