Files
matlab-learning/c5_5_11.m
2025-10-20 10:11:16 +08:00

6 lines
164 B
Matlab

x=-1:1;
y=[1,2,3,4,5;1,2,1,2,1;5,4,3,2,1];
subplot(1,2,1);bar(x,y,'grouped');
title('Grouped');axis([-3,3,0,6]);
subplot(1,2,2);barh(x,y,'stacked');
title('Stack');