怎么用命令改变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’)怎么用命令改变legend在图中的位置_第1张图片其中’Real’,'Sim’为图例说明;
'location’不变,表示位置属性;
'southeast’表示具体位置。

你可能感兴趣的:(怎么用命令改变legend在图中的位置)