matlab 之 图例legend设置字体、大小、字体粗细等

1、设置图例的字体、大小、字体粗细 

eg:

       h=legend('Initialize (x_0, y_0)=(4, 0) \rm{m}','Initialize (x_0, y_0)=(0, 8) \rm{m}');
       set(h,'FontName','Times New Roman','FontSize',11,'FontWeight','normal')

 

 

根据引用中的示例代码,可以使用以下方式设置MATLAB图例中图标的大小: ```matlab lgd(3).Children.MarkerSize = 12; lgd(4).Children.MarkerSize = 12; ``` 其中,`lgd`是通过`legend`函数返回的图例对象。通过修改`lgd`对象中对应图标的`MarkerSize`属性,可以设置图标的大小。 另外,根据引用中的示例代码,可以使用以下方式设置MATLAB图例字体大小字体粗细: ```matlab set(h, 'FontName', 'Times New Roman', 'FontSize', 11, 'FontWeight', 'normal'); ``` 其中,`h`是通过`legend`函数返回的图例对象。通过使用`set`函数设置图例对象的`FontName`、`FontSize`和`FontWeight`属性,可以设置图例字体大小字体粗细。<span class="em">1</span><span class="em">2</span> #### 引用[.reference_title] - *1* [MATLAB 修改 legend 图标大小](https://blog.csdn.net/qq_44873646/article/details/127180946)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"] - *2* [matlablegend字体大小设置(一)](https://blog.csdn.net/qq_43088919/article/details/124530410)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值