![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/666755/image.png)
How to affix a horizontal subplot below a regular plot?
1 回表示 (過去 30 日間)
古いコメントを表示
Summary is it. I want to have a regular plot directly above a subplot (horizontal, about half the vertical size of the top plot).
0 件のコメント
採用された回答
Image Analyst
2021 年 6 月 27 日
編集済み: Image Analyst
2021 年 6 月 27 日
Do you mean like this:
subplot(3, 1, 1:2);
plot(rand(10, 1), 'b.-', 'LineWidth', 2);
grid on;
subplot(3, 1, 3);
plot(rand(10, 1), 'b.-', 'LineWidth', 2);
grid on;
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/666755/image.png)
Just use the top 2 plots in a 3x1 grid to do one plot, then the final last plot in the bottom row to do your other plot.
2 件のコメント
Image Analyst
2021 年 6 月 27 日
You can even combine different kinds of subplots, like:
% Plot in upper two lanes
subplot(3, 1, 1:2);
plot(rand(10, 1), 'b.-', 'LineWidth', 2);
grid on;
% Plot in lower left
subplot(3, 3, 7);
plot(rand(10, 1), 'b.-', 'LineWidth', 2);
grid on;
% Plot in lower right two panels.
subplot(3, 3, 8:9);
plot(rand(10, 1), 'b.-', 'LineWidth', 2);
grid on;
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/666765/image.png)
その他の回答 (1 件)
参考
カテゴリ
Help Center および File Exchange で Subplots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!