怎么用命令改变legend在图中的位置

怎么用命令改变legend在图中的位置

命令格式如下:
legend(‘string’,‘location’,‘位置’)
其中’string’表示名称;
'location’不要改变;
'位置’表示legend所在的位置,可调用的命令如下:
‘north’ 坐标轴中的顶部
‘south’ 坐标轴中的底部
‘east’ 坐标轴中的右侧区域
‘west’ 坐标轴中的左侧区域
‘northeast’ 坐标轴中的右上角(二维坐标轴的默认值)
‘northwest’ 坐标轴中的左上角
‘southeast’ 坐标轴中的右下角
‘southwest’ 坐标轴中的左下角
‘northoutside’ 坐标轴的上方
‘southoutside’ 坐标轴的下方
‘eastoutside’ 到坐标轴的右侧
‘westoutside’ 到坐标轴的左侧
‘northeastoutside’ 坐标轴外的右上角(三维坐标轴的默认值)
‘northwestoutside’ 坐标轴外的左上角
‘southeastoutside’ 坐标轴外的右下角
‘southwestoutside’ 坐标轴外的左下角
‘best’ 坐标轴内与绘图数据冲突最少的地方
‘bestoutside’ 到坐标轴的右侧

示例:legend(‘Real’,‘Sim’,‘location’,‘southeast’)在这里插入图片描述其中’Real’,'Sim’为图例说明;
'location’不变,表示位置属性;
'southeast’表示具体位置。

  • 0
    点赞
  • 14
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值