Sub category plots in MATLAB?
5 ビュー (過去 30 日間)
古いコメントを表示
I want to plot a graph with sub category. It should look something like the graph in the image.![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/437648/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/437648/image.png)
0 件のコメント
回答 (1 件)
Shubham Khatri
2020 年 12 月 7 日
Hello,
Please take a look at the following code
example = readtable('example.CSV');
example = sortrows(example,'Group');
h = bar(table2array(example(:,3:6)),'stacked');
set(gca,'xticklabel',table2array(example(:,2)));
Also please take a look at this answer
Hope it helps
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Annotations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!