MATLAB: Font of axis data and legends

axis datafont

How can I change the font of x-axis (or y-axis or the legend)? I want to change a from matlab command not by clicking on the figure. Like "FontSize" for the texts or "LineWidth" for the curves, is there a variable that I can change the font of axis data?

Best Answer

Get the handle of the label, legend etc: Handle=xlabel(...) Then you can use set(Handle,'FontName',[name of font])