How to change default title font in tiled layout

15 Ansichten (letzte 30 Tage)
Malte Andersen
Malte Andersen am 24 Feb. 2020
Kommentiert: Axel Heußer am 8 Jun. 2022
I'm trying to change the font of a series of plots in a tiled layout to a LaTeX font. I've placed these in the startup.m file already:
set(groot,'defaulttextinterpreter','latex');
set(groot,'defaultLegendInterpreter','latex');
set(groot,'defaultAxesTickLabelInterpreter','latex');
In normal plots, the title is changed to a LaTeX font but when I make plots in a tiled layout, the overall title for all of the subplots are still not in a LaTeX font.
I feel like I just need to add a single line to that piece of code to make it work but I can't figure out what the title for a tiled layout is called. Hope you can help. I've attached a photo of what it looks like right now.

Akzeptierte Antwort

Samatha Aleti
Samatha Aleti am 28 Feb. 2020
Hi,
The issue when changing default "Interpreter" for "tiledlayout" has been brought to the notice of our developers. They will investigate the matter further.
As a workaround, you can do either of follows:
1) Use “subplots” instead of “tiledlayout” to change the default Interpreter to “Latex
(or)
2) Change the Interpreter separately as follows:
t = tiledlayout(2,2);
plot(1:4,2:2:8);
txt = title(t,'Title with latex character $\frac{1}{2}$');
txt.Interpreter= 'latex';
Hope this helps!
  2 Kommentare
Robert Cooper
Robert Cooper am 10 Jun. 2021
A follow-up on this question: tiledlayout does not seem to respect any of the default figure settings. I use the following settings on all my figures, to make them more readable. This works fine for normal figures or subplots. However, with tiledlayout, the individual plots do not follow my set default line widths and font sizes.
figure('DefaultLineLineWidth',3,...
'DefaultAxesLineWidth',3,...
'DefaultAxesFontSize',20,...
'DefaultTextFontSize',20,...
'DefaultLineMarkerSize',25)
Axel Heußer
Axel Heußer am 8 Jun. 2022
Hi Samatha,
I'm using R2022a and the interpreter for tiledlayout is still unaffected by the default setting - which I switched to latex with help of this Q&A.
Can you please open or re-open the respective ticket to this issue? I'd appreciate that.
Thanks & Regards, Axel

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Axes Appearance finden Sie in Help Center und File Exchange

Produkte


Version

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by