필터 지우기
필터 지우기

Graphs with stacked plot

조회 수: 1 (최근 30일)
Ammy
Ammy 2022년 4월 5일
답변: Voss 2022년 4월 5일
figure;
t=tiledlayout(3,1,'TileSpacing','none');
nexttile;
plot(x,y1,x,y2);
xticks([])
nexttile;
plot(x,y2,x,y3);
xticks([])
nexttile;
plot(x,y3,x,y1);
linkaxes(t.Children,'x')
How can I draw the above with stackedplot, the following gives only single output
x=linspace(0,2*pi,100)';
y1=sin(x);
y2=cos(x);
y3=tan(x);
stackedplot(x,[y1 y2 y3],x,y1)

채택된 답변

Voss
Voss 2022년 4월 5일
x=linspace(0,2*pi,100)';
y1=sin(x);
y2=cos(x);
y3=tan(x);
stackedplot(table(x,y1,y2,y3),{{'y1' 'y2'} {'y2' 'y3'} {'y3' 'y1'}});

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by