"Manually" adjusting the position of tiles in a tiled layout using Property Inspector
92 ビュー (過去 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!