Matlab Plot 和 Line区别
2015-06-08 17:12
441 查看
Many MATLAB graphics functions call the object creation functions to draw graphics objects. However, high-level routines also clear the axes or create a new figure, depending on the settings of the axes and figure
Matlab图像函数请求对象创建函数画图像对象,但是,高级函数往往同时清除坐标轴或创建一幅新图像,取决于坐标轴的设置和图像的NextPlot属性。
In contrast, core object creation functions simply create their respective graphics objects and place them in the current parent object. They do not respect the settings of the figure or axes
相反地,核心对象创建函数只创建它们各自的图像对象,把他们放在现有的父对象中,他们不管图像的设置或坐标轴的属性。
For example, if you call the
函数
MATLAB draws a red line in the current axes using the specified data values. If there is no axes, MATLAB creates one. If there is no figure window in which to create the axes, MATLAB creates it as well.
Matlab用给出的数据在现有的坐标系中画一条红色的线。如果还没有坐标轴,会创建一个。如果甚至还没有图像窗口,也会创建一个。
If you call the
a second time, MATLAB draws the second line in the current axes without erasing the first line. This behavior is different from high-level functions like
delete graphics objects and reset all axes properties (except
You can change the behavior of high-level functions by using the
or by changing the setting of the axes
但是!如果你再次请求line函数,MATLAB 在现有的坐标中画一条线,并不会擦除我们刚才画的那条。这与高级函数不同,如plot一样的高级函数,如果我们第二次请求,PLOT 会删除刚才的图像,重置坐标属性(除了Position和Units)。 你可以通过HOLD命令或改变坐标的NEXTPLOT属性设置来改变高级函数的这一行为。
NextPlotproperties.
Matlab图像函数请求对象创建函数画图像对象,但是,高级函数往往同时清除坐标轴或创建一幅新图像,取决于坐标轴的设置和图像的NextPlot属性。
In contrast, core object creation functions simply create their respective graphics objects and place them in the current parent object. They do not respect the settings of the figure or axes
NextPlotproperty.
相反地,核心对象创建函数只创建它们各自的图像对象,把他们放在现有的父对象中,他们不管图像的设置或坐标轴的属性。
For example, if you call the
linefunction,举例,如果请求Line
函数
<code style="margin: 0px; padding: 0px; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; white-space: inherit;"><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);">line</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);">(</span><span class="str" style="margin: 0px; padding: 0px; border: 0px; color: rgb(128, 0, 0);">'XData'</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);">,</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);">x</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);">,</span><span class="str" style="margin: 0px; padding: 0px; border: 0px; color: rgb(128, 0, 0);">'YData'</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);">,</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);">y</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);">,</span><span class="str" style="margin: 0px; padding: 0px; border: 0px; color: rgb(128, 0, 0);">'ZData'</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);">,</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);">z</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);">,</span><span class="str" style="margin: 0px; padding: 0px; border: 0px; color: rgb(128, 0, 0);">'Color'</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);">,</span><span class="str" style="margin: 0px; padding: 0px; border: 0px; color: rgb(128, 0, 0);">'r'</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 0);">)</span></code>
MATLAB draws a red line in the current axes using the specified data values. If there is no axes, MATLAB creates one. If there is no figure window in which to create the axes, MATLAB creates it as well.
Matlab用给出的数据在现有的坐标系中画一条红色的线。如果还没有坐标轴,会创建一个。如果甚至还没有图像窗口,也会创建一个。
If you call the
linefunction
a second time, MATLAB draws the second line in the current axes without erasing the first line. This behavior is different from high-level functions like
plotthat
delete graphics objects and reset all axes properties (except
Positionand
Units).
You can change the behavior of high-level functions by using the
holdcommand
or by changing the setting of the axes
NextPlotproperty.
但是!如果你再次请求line函数,MATLAB 在现有的坐标中画一条线,并不会擦除我们刚才画的那条。这与高级函数不同,如plot一样的高级函数,如果我们第二次请求,PLOT 会删除刚才的图像,重置坐标属性(除了Position和Units)。 你可以通过HOLD命令或改变坐标的NEXTPLOT属性设置来改变高级函数的这一行为。
相关文章推荐
- Matlab求{1}-inverse
- MATLAB新手教程
- SVM实现多分类的程序基础工作(一)——安装libsvm以及libsvm和matlab自带的svm的区别
- 如何将matlab中文版本转换为英文界面
- MATLAB R2014b如何换回纯英文界面
- matlab字符串操作总结
- MATLAB在同一个图中绘制多条曲线(直角坐标和极坐标)
- matlab 在柱状图上 显示数字
- 机器学习Matlab实战之图像压缩————Kmeans算法
- matlab 学习笔记
- 机器学习Matlab实战之垃圾邮件分类————朴素贝叶斯模型
- matlab plot符号
- C#调用MATLAB 库函数记录
- VC与Matlab混合编程及复杂数据:结构体传递
- matlab中提示m文件不在current folder下(实际上在)
- MATLAB导入数据importdata功能
- Matlab图像处理系列4———图像傅立叶变换与反变换
- matlab灰度变换rgb2gray与直方图均衡化histeq
- Matlab Instrument Control Toolsbox Serial Send/Receive 基本使用
- 用支持向量机做OCR(MATLAB)