Im working with Matlab 2016. You can tried two things:
1)figure('DefaultAxesFontSize',30); % here the font size is 30. figure (1) plot(x,y,'LineWidth',4); % note that the linewidth here is 4 xlabel('length bar','FontSize',18); % note that the font size label here is 18 ylabel('wide bar','FontSize',18); % note that the font size label here is 18
and you must to use the dame command figure('DefaultAxesFontSize',30) in each figure. If you dont specified the font size in each label, the labels shows the size in "30"
Or you can tried:
2) figure (1) plot(x,y,'LineWidth',4); set(gca,'FontSize',28); % please, note that the font size is AFTER the plot command :)
10 Comments
Direct link to this comment
https://www.mathworks.com/matlabcentral/answers/131236-how-do-i-change-the-font-size-for-text-in-my-figure#comment_216066
Direct link to this comment
https://www.mathworks.com/matlabcentral/answers/131236-how-do-i-change-the-font-size-for-text-in-my-figure#comment_216066
Direct link to this comment
https://www.mathworks.com/matlabcentral/answers/131236-how-do-i-change-the-font-size-for-text-in-my-figure#comment_260878
Direct link to this comment
https://www.mathworks.com/matlabcentral/answers/131236-how-do-i-change-the-font-size-for-text-in-my-figure#comment_260878
Direct link to this comment
https://www.mathworks.com/matlabcentral/answers/131236-how-do-i-change-the-font-size-for-text-in-my-figure#comment_265799
Direct link to this comment
https://www.mathworks.com/matlabcentral/answers/131236-how-do-i-change-the-font-size-for-text-in-my-figure#comment_265799
Direct link to this comment
https://www.mathworks.com/matlabcentral/answers/131236-how-do-i-change-the-font-size-for-text-in-my-figure#comment_325409
Direct link to this comment
https://www.mathworks.com/matlabcentral/answers/131236-how-do-i-change-the-font-size-for-text-in-my-figure#comment_325409
Direct link to this comment
https://www.mathworks.com/matlabcentral/answers/131236-how-do-i-change-the-font-size-for-text-in-my-figure#comment_352543
Direct link to this comment
https://www.mathworks.com/matlabcentral/answers/131236-how-do-i-change-the-font-size-for-text-in-my-figure#comment_352543
Direct link to this comment
https://www.mathworks.com/matlabcentral/answers/131236-how-do-i-change-the-font-size-for-text-in-my-figure#comment_396894
Direct link to this comment
https://www.mathworks.com/matlabcentral/answers/131236-how-do-i-change-the-font-size-for-text-in-my-figure#comment_396894
Direct link to this comment
https://www.mathworks.com/matlabcentral/answers/131236-how-do-i-change-the-font-size-for-text-in-my-figure#comment_485684
Direct link to this comment
https://www.mathworks.com/matlabcentral/answers/131236-how-do-i-change-the-font-size-for-text-in-my-figure#comment_485684
Direct link to this comment
https://www.mathworks.com/matlabcentral/answers/131236-how-do-i-change-the-font-size-for-text-in-my-figure#comment_844955
Direct link to this comment
https://www.mathworks.com/matlabcentral/answers/131236-how-do-i-change-the-font-size-for-text-in-my-figure#comment_844955
Direct link to this comment
https://www.mathworks.com/matlabcentral/answers/131236-how-do-i-change-the-font-size-for-text-in-my-figure#comment_844964
Direct link to this comment
https://www.mathworks.com/matlabcentral/answers/131236-how-do-i-change-the-font-size-for-text-in-my-figure#comment_844964
Direct link to this comment
https://www.mathworks.com/matlabcentral/answers/131236-how-do-i-change-the-font-size-for-text-in-my-figure#comment_988208
Direct link to this comment
https://www.mathworks.com/matlabcentral/answers/131236-how-do-i-change-the-font-size-for-text-in-my-figure#comment_988208
Sign in to comment.