subplot with 1 large and 2 small figures

조회 수: 7 (최근 30일)
HC98
HC98 2023년 6월 15일
편집: Les Beckham 2023년 6월 15일
Is it possible to create a subplot like this? I.e.,
% | 1 |
% |________|
% | 2 | 3 |
% | | |

채택된 답변

Star Strider
Star Strider 2023년 6월 15일
Perhaps something like this —
x = 0:0.01:6.2;
figure
subplot(2,2,[1 2])
plot(x, sin(2*pi*4*x))
subplot(2,2,3)
plot(x, cos(2*pi*6*x))
subplot(2,2,4)
plot(x, sin(2*pi*x).*cos(2*pi*x*2))
.

추가 답변 (1개)

Les Beckham
Les Beckham 2023년 6월 15일
편집: Les Beckham 2023년 6월 15일
Yes it is. Here is an example. See the documentation for tiledlayout.
tiledlayout(2, 2)
nexttile([1 2]) % first plot spans two tiles
plot(rand(1,10))
grid on
nexttile
plot(10*rand(1,10))
grid on
nexttile
plot(100*rand(1,10))
grid on

카테고리

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

제품


릴리스

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by