Two letters X and m on the same axis, I want X to be italic and m to be normal.
figure, xlabel('\itX, m') %Display the x-coordinate
% Display the result: X and M are italicized.
figure, xlabel('\itX, m') %Display the x-coordinate
% Display the result: X and M are italicized.
In MATLAB, how to realize X is italic, m is normal.
To solve the above problems:
- 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?
- 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)')