Multiple color bar graph in Matlab

2 visualizaciones (últimos 30 días)
Vartika Agarwal
Vartika Agarwal el 20 de Mayo de 2022
Respondida: KSSV el 20 de Mayo de 2022
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

Respuesta aceptada

KSSV
KSSV el 20 de Mayo de 2022
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

Más respuestas (0)

Categorías

Más información sobre Graphics Object Identification en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by