Y=[ 1 9 5 4 20
6 6 7 5 19
10 10 6 5 21]
need stacked plot of these data. But x axis would be 1, 6, 10 and y axis stacked bar data (9,5,4,20), (6,7,5,19) and (10,6,5,21)

 Akzeptierte Antwort

Joel Lynch
Joel Lynch am 9 Jun. 2021
Bearbeitet: Joel Lynch am 9 Jun. 2021
bar(Y(:,1),Y(:,2:end))

3 Kommentare

Thank you for your responce. but how can i plot it as a stacked bar.
bar(Y(:,1),Y(:,2:end),'stacked')
Thank you

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Line Plots finden Sie in Hilfe-Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by