octave 之 legend用法
2015-11-28 14:36
417 查看
Function File: legend (str1, str2, …)
Function File: legend (matstr)
Function File: legend (cellstr)
Function File: legend (…, "location", pos)
Function File: legend (…, "orientation", orient)
Function File: legend (hax, …)
Function File: legend (hobjs, …)
Function File: legend (hax, hobjs, …)
Function File: legend ("option")
Function File: [hleg, hleg_obj, hplot, labels] = legend (…)
Display a legend for the current axes using the specified strings as labels.
Legend entries may be specified as individual character string arguments, a character array, or a cell array of character strings.
If the first argument hax is an axes handle, then plot into this axis, rather than the current axes returned by
on line graphs, bar graphs, etc. A plot must exist before legend is called.
The optional parameter pos specifies the location of the legend as follows:
The optional parameter orient determines if the key elements are placed vertically or horizontally. The allowed values are
The following customizations are available using option:
Show legend on the plot
Hide legend on the plot
Toggles between
Show a box around legend (default)
Hide the box around legend
Place label text to the right of the keys (default)
Place label text to the left of the keys
Delete the legend object
The optional output values are
hleg
The graphics handle of the legend object.
hleg_obj
Graphics handles to the text and line objects which make up the legend.
hplot
Graphics handles to the plot objects which were used in making the legend.
labels
A cell array of strings of the labels in the legend.
The legend label text is either provided in the call to
…,
Implementation Note: A legend is implemented as an additional axes object of the current figure with the
Function File: legend (matstr)
Function File: legend (cellstr)
Function File: legend (…, "location", pos)
Function File: legend (…, "orientation", orient)
Function File: legend (hax, …)
Function File: legend (hobjs, …)
Function File: legend (hax, hobjs, …)
Function File: legend ("option")
Function File: [hleg, hleg_obj, hplot, labels] = legend (…)
Display a legend for the current axes using the specified strings as labels.
Legend entries may be specified as individual character string arguments, a character array, or a cell array of character strings.
If the first argument hax is an axes handle, then plot into this axis, rather than the current axes returned by
gca. If the handles, hobjs, are not specified then the legend’s strings will be associated with the axes’ descendants.
legendworks
on line graphs, bar graphs, etc. A plot must exist before legend is called.
The optional parameter pos specifies the location of the legend as follows:
pos | location of the legend | |
---|---|---|
north | center top | |
south | center bottom | |
east | right center | |
west | left center | |
northeast | right top (default) | |
northwest | left top | |
southeast | right bottom | |
southwest | left bottom | |
outside | can be appended to any location string |
"vertical"(default) or
"horizontal".
The following customizations are available using option:
"show"
Show legend on the plot
"hide"
Hide legend on the plot
"toggle"
Toggles between
"hide"and
"show"
"boxon"
Show a box around legend (default)
"boxoff"
Hide the box around legend
"right"
Place label text to the right of the keys (default)
"left"
Place label text to the left of the keys
"off"
Delete the legend object
The optional output values are
hleg
The graphics handle of the legend object.
hleg_obj
Graphics handles to the text and line objects which make up the legend.
hplot
Graphics handles to the plot objects which were used in making the legend.
labels
A cell array of strings of the labels in the legend.
The legend label text is either provided in the call to
legendor is taken from the DisplayName property of graphics objects. If no labels or DisplayNames are available, then the label text is simply
"data1",
"data2",
…,
"dataN".
Implementation Note: A legend is implemented as an additional axes object of the current figure with the
"tag"set to
"legend". Properties of the legend object may be manipulated directly by using
set.
相关文章推荐
- 在Octave上安装vlfeat
- Octave使用vim作为默认编辑器
- Octave入门基础
- [转载]Matlab fmincon函数用法
- Octave 命令
- windows下安装octave工具箱
- Ubuntu14.04安装Octave
- Machine Learning week 2 quiz: Octave Tutorial
- Octave相关学习资源整理出
- Octave 作业提交问题"Exception: We could not verify your username / password" 解决
- 斯坦福大学机器学习公开课 ---Octave Tutorial Transcript
- 斯坦福大学机器学习公开课---Programming Exercise 1: Linear Regression
- 从零单排入门机器学习:Octave/matlab的常用知识之矩阵和向量
- 从零单排入门机器学习:OctaveMatlab的常用知识之画图
- 从零单排入门机器学习:线性回归(linear regression)实践篇
- ufldl学习笔记与编程作业:Linear Regression(线性回归)
- ufldl学习笔记与编程作业:Logistic Regression(逻辑回归)
- ufldl学习笔记与编程作业:Vectorization(向量化/矢量化)
- ufldl学习笔记与编程作业:Debugging: Gradient Checking(梯度检测)
- ufldl学习笔记与编程作业:Softmax Regression(softmax回归)