필터 지우기
필터 지우기

Subplots with multiple axes

조회 수: 1 (최근 30일)
Emily Gallagher
Emily Gallagher 2019년 9월 17일
답변: darova 2019년 9월 18일
I am trying to plot a figure with four subplots. This is what I am entering but it is only producing one graph. Any advice?
n=1:10;
subplot(1,10,n);
plot(x,y,'.-');
subplot(1,10,n);
semilogx(x,y);
subplot(1,10,n);
semilogy(x,y);
subplot(1,10,n);
loglog(x,y);

채택된 답변

darova
darova 2019년 9월 18일
I think you mean this
n = 10; % 10 subplot but only 4 of them are used ?
subplot(1,n,1);
plot(x,y,'.-');
subplot(1,n,2);
semilogx(x,y);
subplot(1,n,3);
semilogy(x,y);
subplot(1,n,4);
loglog(x,y);

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by