필터 지우기
필터 지우기

Remove the gaps between the bars in matlab without changing the width of the bars

조회 수: 2 (최근 30일)
Torkan
Torkan 2021년 3월 27일
댓글: Torkan 2021년 3월 27일
Hello,
How can I do that?
clear all,
close all,
Zigma_nohole = [882,873,860];
Zigma_1hole = [523,540,545];
Zigma_2H0 = [393,355,358,352];
Zigma_2H45 = [389,360,365,376];
Zigma_2H90 = [580,540,545,547];
Avg_nohole = mean (Zigma_nohole);
Avg_1hole = mean (Zigma_1hole);
Avg_2H0 = mean (Zigma_2H0);
Avg_2H45 = mean (Zigma_2H45);
Avg_2H90 = mean (Zigma_2H90);
AVG_ALL = [Avg_nohole,Avg_1hole,Avg_2H0,Avg_2H45,Avg_2H90];
std_nohole = std (Zigma_nohole);
std_1hole = std (Zigma_1hole);
std_2H0 = std (Zigma_2H0);
std_2H45 = std (Zigma_2H45);
std_2H90 = std (Zigma_2H90);
STD_ALL = [std_nohole,std_1hole,std_2H0,std_2H45,std_2H90];
y = [ Avg_nohole; Avg_1hole; Avg_2H0; Avg_2H45; Avg_2H90];
bh = bar(1:5,diag(y),0.5,'stacked','FaceColor', 'c');
bh(1).FaceColor = 'r';
bh(2).FaceColor = 'b';
bh(3).FaceColor = 'g';
bh(4).FaceColor = 'k';
bh(5).FaceColor = 'y';
legend('Nohole','1hole','2H0','2H45','2H90')
hold on
h = errorbar(1:5,AVG_ALL,STD_ALL, '.');
ylabel('Tensile Strength (MPa)')
  댓글 수: 3

댓글을 달려면 로그인하십시오.

답변 (1개)

Torkan
Torkan 2021년 3월 27일
Could you please share with me? I want to reduce the width actually btw

카테고리

Help CenterFile Exchange에서 Dialog Boxes에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by