Sub category plots in MATLAB?
9 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposte (1)
Shubham Khatri
il 7 Dic 2020
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 Commenti
Vedere anche
Categorie
Scopri di più su 2-D and 3-D Plots in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!