Azzera filtri
Azzera filtri

set TileSpacing in reopened figure

4 visualizzazioni (ultimi 30 giorni)
abu
abu il 25 Ago 2021
Commentato: abu il 26 Ago 2021
Hello,
I have a bunch of old .fig without the sourcecode at hand :-( . They were created using
t = tiledlayout(3,1);
t.TileSpacing = 'none';
Now when I reopen the figures I can manually change the TileSpacing in the Property Inspector to 'tight' , however I was not able to find a command to change the property by command line / code. Any suggestion is greatly appreciated!
Thanks in advance,
Andi

Risposta accettata

Chunru
Chunru il 26 Ago 2021
Modificato: Chunru il 26 Ago 2021
t = tiledlayout(3,1);
t.TileSpacing = 'none';
nexttile;
plot(rand(10,1));
nexttile;
plot(rand(10,1));
nexttile;
plot(rand(10,1));
savefig(gcf, 'output.fig');
figure;
open('output.fig')
h=findobj(gcf, 'Type', 'tiledlayout');
h.TileSpacing = 'tight';
  1 Commento
abu
abu il 26 Ago 2021
Works like charme, thanks for the support :-)
I was fiddling with findobj before, however not looking for tiledlayout, but for TileSpacing or TiledChartLayout. It seems I am not clear about the differences between objects, properties, classes etc. Do you have a resource at hand that could help me better understanding those basics?
Thank you again!

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Interactive Control and Callbacks in Help Center e File Exchange

Prodotti


Release

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by