필터 지우기
필터 지우기

Sub category plots in MATLAB?

조회 수: 9 (최근 30일)
vidit kedia
vidit kedia 2020년 12월 1일
답변: Shubham Khatri 2020년 12월 7일
I want to plot a graph with sub category. It should look something like the graph in the image.

답변 (1개)

Shubham Khatri
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

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by