필터 지우기
필터 지우기

Can i convert subplots in tiledlayouts?

조회 수: 15 (최근 30일)
Max1234
Max1234 2023년 4월 5일
댓글: Adam Danz 2023년 4월 6일
Hi guys,
I have created a figure with several subplots. But I would like to change to tiledlayout because of the advantages. Unfortunately, I have not yet found a way to end up with a figure that has the same size and the same division of the subplot. Do you know a solution for this?
Here is the structure of my previous figure:
figure('Name','Example','Position',[-300 1120 2200 1300]);
subplot(4,5,[1 2 3 6 7 8]);
subplot(4,5,[11 12]);
subplot(4,5,[16 17]);
subplot(4,5,[4]);
subplot(4,5,[5]);
etc.
.....
all others are single plots with one place
Thank you very much!
  댓글 수: 2
Adam Danz
Adam Danz 2023년 4월 5일
I edited your question to format your code and run the results.
What does the "etc" mean? Is there more to it or is this the complete picture?
What does this mean "all others are single plots..." ? Does that mean there are more axes in the picture?
Max1234
Max1234 2023년 4월 5일
Thank you very much for the answer. With etc. and all other individual diagrams the "free places" are meant. As on the top right, small individual diagrams should be placed there.

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

채택된 답변

Adam Danz
Adam Danz 2023년 4월 5일
편집: Adam Danz 2023년 4월 5일
See tiledlayout to learn about layout options and spacing.
See nexttile to learn about setting the tile location and span.
fig = figure();
tcl = tiledlayout(fig,4,5,'TileSpacing','Compact'); % or 'tight', etc
ax1 = nexttile(tcl, [2,3]); % subplot(4,5,[1 2 3 6 7 8]);
ax2 = nexttile(tcl, 11, [1,2]); % subplot(4,5,[11 12]);
ax3 = nexttile(tcl, 16, [1,2]); % subplot(4,5,[16 17]);
ax4 = nexttile(tcl, 4); % subplot(4,5,[4]);
ax5 = nexttile(tcl, 5); % subplot(4,5,[5]);
  댓글 수: 2
Max1234
Max1234 2023년 4월 5일
Great, thank you very much! It worked. I would now like to apply the axis labelling only for the eight diagrams marked on the right. This is how it is described in the help. Unfortunately, this only works for all diagrams and not for a selection as here. Is there a possibility?
Adam Danz
Adam Danz 2023년 4월 6일
I'm not sure what you mean by axis labeling but it sounds like you can use the axis handles to control this.
set([ax1,ax2,ax3],'XTick',[],'YTick',[])

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

추가 답변 (0개)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by