필터 지우기
필터 지우기

Strange behavior with subplot command: plots only the last plot

조회 수: 3 (최근 30일)
amg
amg 2015년 4월 8일
편집: Star Strider 2015년 4월 8일
I'm trying to plot subplots, but the command only produces a single plot (the very last one) in a single figure window. I've run code for subplots that was previously working fine only to have the same problem.
To troubleshoot, I also ran the code on Matlab's documentation page for subplot (below), and again it produces just a single plot, the last one, taking up the entire figure. What's going on and is there a way to fix it?
Code from Matlab documentation page:
x = linspace(0,10);
y1 = sin(x);
y2 = sin(5*x);
figure
subplot(2,1,1);
plot(x,y1)
subplot(2,1,2);
plot(x,y2)
(I use Matlab 2014a on a Mac.)

답변 (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