Matlab drawing axis characters use italics

Two letters X and m on the same axis, I want to be italic and m to be normal.
figure, xlabel('\itX, m') %Display the x-coordinate
% Display the result: X and M are italicized.

In MATLAB, how to realizeis italic, m is normal.

To solve the above problems:

  1. figure,  xlabel('\itX, \rmm')

So, if you want to set the font of x and m in xlabel('\itX, \rmm') to Times New Roman, how to set it?

  1. figure,  xlabel('\it\fontname{Times New Roman}X, \rm\fontname{Times New Roman}m')


If I want to set the abscissa x to be times new roman italic, and the ordinate to display f(x), where f and x are times new roman italic, and the brackets () are normal, how should I set it?

xlabel('\it\fontname{Times New Roman}x')
ylabel('\it\fontname{Times New Roman}f \rm(\it\fontname{Times New Roman}x\rm)')

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325666698&siteId=291194637