I use the example of plotmf function in the document and at the same time, I want to change the font of x label. So I use the code below:
fis = readfis('tipper');
plotmf(fis,'input',1)
xlabel('\fontname{宋体} 论域')
ylabel('\fontname{宋体} 隶属度')
But the xlabel shows it in its original state as \fontname{宋体} 论域, and the ylabel is what I want. The figure is below:

So why does the fontname command in xlabel not work?
My proposition
- I change the order of
xlabelandylabelin the code, for thinking the failure may occur only at the firstlabel. But it is still thexlabelthat doesn't work. - I use another plot function, such as
plot. Then bothxlabelandylabelwork properly.
So I think the key point is the definition of xlabel of plotmf function.
MATLAB R2023b.
My method to avoid the problem (one can neglect)
Then I use another method avoiding the fontname in label using gca as
fis = readfis('tipper');
plotmf(fis,'input',1)
xlabel('论域')
ylabel('\fontname{宋体} 隶属度')
set(gca, 'FontName', '宋体');
And it works. But I want to simultaneously show different fonts in a label, such as xlabel('\fontname{宋体} 时间\fontname{Times new roman} (s)'), and gca fails.
So this is not a good method, and it doesn't explain the issue.

This is likely caused by this function setting the interpreter used by the label. Each text object has an
Interpreterproperty that can be set to'tex'(default),'latex'or'none'. Putting it back to the default value should fix this:But an easier way to set the font is by using the
FontNameproperty, which not only applies to the axes as a whole, but can be set to each text object: