Matlab中画图时的标注函数legend
来源:互联网 发布:淘宝降价活动 编辑:程序博客网 时间:2024/05/16 17:44
用Matlab画图时,有时候需要对各种图标进行标注,例如,用“+”代表A的运动情况,“*”代表B的运动情况。
legend函数的基本用法是
LEGEND(string1,string2,string3, ...)
分别将字符串1、字符串2、字符串3……标注到图中,每个字符串对应的图标为画图时的图标。
例如:
plot(x,sin(x),'.b',x,cos(x),'+r')
legend('sin','cos')这样可以把"."标识为'sin',把"+"标识为"cos"
还可以用LEGEND(...,'Location',LOC) 来指定图例标识框的位置
这些是Matlab help文件。后面一段是对应的翻译和说明
'North' inside plot box near top
'South' inside bottom
'East' inside right
'West' inside left
'NorthEast' inside top right (default)
'NorthWest inside top left
'SouthEast' inside bottom right
'SouthWest' inside bottom left
'NorthOutside' outside plot box near top
'SouthOutside' outside bottom
'EastOutside' outside right
'WestOutside' outside left
'NorthEastOutside' outside top right
'NorthWestOutside' outside top left
'SouthEastOutside' outside bottom right
'SouthWestOutside' outside bottom left
'Best' least conflict with data in plot
'BestOutside' least unused space outside plot
'North' 图例标识放在图顶端
'South' 图例标识放在图底端
'East' 图例标识放在图右方
'West' 图例标识放在图左方
'NorthEast' 图例标识放在图右上方(默认)
'NorthWest 图例标识放在图左上方
'SouthEast' 图例标识放在图右下角
'SouthWest' 图例标识放在图左下角
(以上几个都是将图例标识放在框图内)
'NorthOutside' 图例标识放在图框外侧上方
'SouthOutside' 图例标识放在图框外侧下方
'EastOutside' 图例标识放在图框外侧右方
'WestOutside' 图例标识放在图框外侧左方
'NorthEastOutside' 图例标识放在图框外侧右上方
'NorthWestOutside' 图例标识放在图框外侧左上方
'SouthEastOutside' 图例标识放在图框外侧右下方
'SouthWestOutside' 图例标识放在图框外侧左下方
(以上几个将图例标识放在框图外)
'Best' 图标标识放在图框内不与图冲突的最佳位置
'BestOutside' 图标标识放在图框外使用最小空间的最佳位置
还是用上面的例子
legend('sin','cos','location','northwest')可以将标识框放置在图的左上角。
- Matlab中画图时的标注函数legend
- Matlab中画图时的标注函数legend
- Matlab中画图时的标注函数legend
- Matlab中画图函数汇总:plot/set/legend
- Matlab中legend函数
- matlab 的legend的任意标注
- MATLAB中legend函数的用法
- matlab中legend函数的用法
- MATLAB批量标注legend
- 【Matlab】Matlab中画图函数汇总:plot/set/legend 持续更新...
- MATLAB函数legend的使用记录:同时对多个函数去线标注标签
- MATLAB 画图 legend
- Matlab中legend函数功能
- Matlab中legend的用法
- MATLAB画图-legend,box用法
- MATLAB画图符号标注
- Matlab中图例注释函数legend详解
- matlab 画图中线型及颜色设置 matlab 作图 标注
- asp.net 常用的33种代码
- SAP-MM事务码
- 《ARM学习手札》----B、BL、BX、BLX 和 BXJ
- zoj 1377 || poj 1228 Grandpa's Estate
- SAP事务码
- Matlab中画图时的标注函数legend
- MOSS/Sharepoint 用户,权限,组,安全性 综合OverView
- 数据抽象
- PhysX物理引擎(入门教程) —— PhysX,Hello World!
- 有关ado的错误信息
- css relative与absolute
- STL set的使用 less function override < operator
- 国内研究生教育为何让人这么纠结!
- Android中的布局方式(一)