Align subplots non-manually

조회 수: 4 (최근 30일)
Dave
Dave 2016년 6월 17일
댓글: Dave 2016년 6월 17일
I have a figure with 5 subplots. Aside from doing it manually, is there are a way to set a 2x3 subplot figure in a way that the first row has 2 subplots and the second row has 3 subplots?
subplot(2,3,1) subplot(2,3,2)
subplot(2,3,3) subplot(2,3,4) subplot(2,3,5)
In way that sub1 and sub2 are centered (so sub1 position should be between sub3 and sub4)
Thanks

채택된 답변

Steven Lord
Steven Lord 2016년 6월 17일
Create a 2 row and 6 column grid of locations for subplots. In the first row, each subplot will span 3 of the columns; in the second row, each will span 2. See example "Subplots with Different Sizes" in the documentation for subplot for a simple example of this general technique.
  댓글 수: 3
Steven Lord
Steven Lord 2016년 6월 17일
Use the same 2 row and 6 column grid, but in the top row have the subplots cover positions 2-3 and 4-5 while in the bottom row they cover 7-8, 9-10, and 11-12. This will leave a space half the size of the axes on either side of the top row.
Dave
Dave 2016년 6월 17일
Thanks

댓글을 달려면 로그인하십시오.

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