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

 Réponse acceptée

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

Plus de réponses (0)

Catégories

En savoir plus sur 2-D and 3-D Plots dans Centre d'aide et File Exchange

Produits

Version

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by