How can I create a stacked bar graph with the following chart?
1 回表示 (過去 30 日間)
古いコメントを表示
Abraham Caceres
2021 年 11 月 9 日
回答済み: Sulaymon Eshkabilov
2021 年 11 月 9 日
A three by four table with categorical and numberic variables. Goal is to combine two categorical variables into one plot variable alongside the results. Example table is typed below:
Fastball Ball 10
Curveball Strike 15
Fastball Strike 20
Curveball Ball 25
0 件のコメント
採用された回答
Sulaymon Eshkabilov
2021 年 11 月 9 日
A = {'Fastball_{Ball}'; 'Curveball_{Strike}'; 'Fastball_{Strike}'; 'Curveball_{Ball}'}; A = categorical(A);
C = [10;15;20;25];
T = table(A); T.C=C; bar(T.A, T.C); %pie(T.A, T.C)
0 件のコメント
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!