"Manually" adjusting the position of tiles in a tiled layout using Property Inspector
92 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (1)
Chris
le 16 Nov 2022
Modifié(e) : Chris
le 16 Nov 2022
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 commentaires
Voir également
Catégories
En savoir plus sur Specifying Target for Graphics Output dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!