"Manually" adjusting the position of tiles in a tiled layout using Property Inspector
조회 수: 90 (최근 30일)
이전 댓글 표시
All:
Thank you for reading this. My goal is to adjust the position of tiles in a tiled layout to match a particular layout that I have in mind. Let's say I have the following:
f1 = @(x) x^2;
f2 = @(x) sin(x);
f3 = @(x) tan(x);
x1 = -100;
x2 = 100;
tiledlayout('flow');
nexttile
fplot(f1, [x1 x2]);
nexttile
fplot(f2, [x1 x2]);
nexttile
fplot(f3, [x1 x2])
After running this code (and getting a tiled figure), I then go to the Property Inspector. I see the following:
I then go to the first Axes (or any of tha axes) and see the following:
However, I can't change any of the position parameters.
What should I do? Additionally, is there a "better" way of customizing the tile positions in a tiled layout?
Thank you.
댓글 수: 0
답변 (1개)
Chris
2022년 11월 16일
편집: Chris
2022년 11월 16일
figure('Color',[.8,.8,.8]) % The default figure color I see is white, which can be confusing
tiledlayout(2,4)
nexttile
nexttile(3,[2,2]) % Skip a tile, start on 3
nexttile([1,2]) % Next available, 2 tiles wide
Setting "flow" gives Matlab the go-ahead to reposition things as necessary, so that's definitely not what you want.
If you want complete control, just place the axes directly.
f = figure('Color',[.8,.8,.8]);
ax1 = axes(f,'Units','Normalized','Position',[0.1 0.1 0.3 0.3]);
ax2 = axes(f,'Units','Normalized','Position',[0.7 0.7 0.2 0.2]);
You can view the properties of each graphics object programmatically, without needing Property inspector.
ax1
plot(ax1,1:10)
There are many properties, of which "Position" is present for figures and axes.
ln = ax1.Children
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Specifying Target for Graphics Output에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!