你可以通过设置图例对象的“FontSize”属性来改变MATLAB图例的字体大小。
例如,画四条线。创建一个legend,并将legend对象赋给变量lgd。然后,使用点符号来访问'FontSize'属性,并将值设置为14点。
情节(兰德(4))
lgd=图例(“一个”,“两个”,“三”,“四”);
乐金显示器。字形大小= 14;
或者,您可以使用“图例”命令中的名称-值对参数指定“FontSize”属性。包括名称-值对参数时,请在单元格数组中包括图例标签。例如:
传奇({“一个”,“两个”,“三”,“四”},“字形大小”14)
4评论
直接链接到这个评论
https://ch.mathworks.com/matlabcentral/answers/101246-how-do-i-change-the-font-size-in-my-legend#comment_486248
直接链接到这个评论
https://ch.mathworks.com/matlabcentral/answers/101246-how-do-i-change-the-font-size-in-my-legend#comment_486248
直接链接到这个评论
https://ch.mathworks.com/matlabcentral/answers/101246-how-do-i-change-the-font-size-in-my-legend#comment_486249
直接链接到这个评论
https://ch.mathworks.com/matlabcentral/answers/101246-how-do-i-change-the-font-size-in-my-legend#comment_486249
直接链接到这个评论
https://ch.mathworks.com/matlabcentral/answers/101246-how-do-i-change-the-font-size-in-my-legend#comment_673785
直接链接到这个评论
https://ch.mathworks.com/matlabcentral/answers/101246-how-do-i-change-the-font-size-in-my-legend#comment_673785
直接链接到这个评论
https://ch.mathworks.com/matlabcentral/answers/101246-how-do-i-change-the-font-size-in-my-legend#comment_1181833
直接链接到这个评论
https://ch.mathworks.com/matlabcentral/answers/101246-how-do-i-change-the-font-size-in-my-legend#comment_1181833
登录评论。