Sub category plots in MATLAB?

8 visualizaciones (últimos 30 días)
vidit kedia
vidit kedia el 1 de Dic. de 2020
Respondida: Shubham Khatri el 7 de Dic. de 2020
I want to plot a graph with sub category. It should look something like the graph in the image.

Respuestas (1)

Shubham Khatri
Shubham Khatri el 7 de Dic. de 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

Categorías

Más información sobre 2-D and 3-D Plots en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by