Incorrect font size for tiledlayout in livescript output [Bug?]

2 vues (au cours des 30 derniers jours)
AndresVar
AndresVar le 24 Nov 2021
Using tiledlayout in a livescript does not output with the correct font size for the axis.
Is this a bug?
See example below, the tiledlayout axes tickmark labels are small.
set(0,'DefaultAxesFontSize', 18);
set(0,'DefaultTextFontSize', 18);
A = rand(3,3);
figure;
tl = tiledlayout(1,2);
for ii = 1:2
nexttile;
plot(A)
end
title(tl,'TILEDLAYOUT WITH INCORRECT FONT SIZE')
figure;
for ii = 1:2
subplot(1,2,ii);
plot(A)
end
sgtitle('SUBPLOT WITH CORRECT FONT SIZE')

Réponse acceptée

Marc Thelen
Marc Thelen le 3 Déc 2021
I think it is supposed to be a feature... You have to change FontSizeMode from auto to manual. You can do this globally like this:
set(groot,'DefaultAxesFontSizeMode','manual');
Or for each tile:
tiledlayout(2,2)
t = nexttile
t.FontSizeMode = 'manual'

Plus de réponses (0)

Catégories

En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange

Produits


Version

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by