How to change X in xlabel to italic font ?

76 views (last 30 days)
Awat
Awat on 20 Jan 2017
Edited: Jan on 20 Aug 2017
xlabel('Distance, X','FontName', 'Times New Roman','FontSize',28,'Color','k')

Answers (2)

Walter Roberson
Walter Roberson on 20 Jan 2017
'FontAngle', 'italic'

Jan
Jan on 20 Aug 2017
Edited: Jan on 20 Aug 2017
xlabel('Distance, $X$', 'FontName', 'Times New Roman', ...
'FontSize',28,'Color','k', 'Interpreter', 'LaTeX')
or
xlabel('Distance, \textit{X}', 'FontName', 'Times New Roman', ...
'FontSize',28,'Color','k', 'Interpreter', 'LaTeX')

Community Treasure Hunt

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

Start Hunting!