matlab中matlab的plot函数数有几种格式

matlab中plot函数标注问题
我的图书馆
matlab中plot函数标注问题
使用语句:text(x,y,‘显示内容’);解释:x,y指定所要显示的文字的位置例子如下:%author:likan%establish_time:%modify_time:% function:Adams做图结果分析a=importdata('txyz2.txt');%ADAMS分析结果导入Time=a(:,1)-10;Data1=a(:,2);Data2=a(:,3)-90;Data3=a(:,4)-90;figure(1);plot(Time,Data1,'b.');plot(Time,Data2,'r+');plot(Time,Data3,'g-');axis([0,10,-20,20]);text(0,19,'欧拉角');title('\fontsize{16}上平台欧拉角');xlabel('\fontsize{16}time/s');ylabel('\fontsize{16}gngle/°');程序运行结果:&
发表评论:
TA的最新馆藏[转]&[转]&matlab中的当有两个自变量时,如何用plot函数画出图象_matlab吧_百度贴吧
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&签到排名:今日本吧第个签到,本吧因你更精彩,明天继续来努力!
本吧签到人数:0成为超级会员,使用一键签到本月漏签0次!成为超级会员,赠送8张补签卡连续签到:天&&累计签到:天超级会员单次开通12个月以上,赠送连续签到卡3张
关注:150,440贴子:
matlab中的当有两个自变量时,如何用plot函数画出图象收藏
matlab中的当有两个自变量时,如何用plot函数画出图象
登录百度帐号推荐应用
为兴趣而生,贴吧更懂你。或matlab中 plot函数全部功能_百度文库
两大类热门资源免费畅读
续费一年阅读会员,立省24元!
matlab中 plot函数全部功能
上传于||暂无简介
你可能喜欢Matlab&plot函数详解
运行下列命令,
x=linspace(0,2*pi,100);
h=plot(x,y);
会显示有关plot句柄的所有相关信息。
GET(H) displays all property names and their current values for the
graphics object with handle H.
显示如下:
&&&&&&&&&&
DisplayName: ''
&&&&&&&&&&&
Annotation: [1x1 hg.Annotation]
&&&&&&&&&&&&&&&&
Color: [0 0 1]
&&&&&&&&&&&&
LineStyle: '-'
&&&&&&&&&&&&
LineWidth: 0.5000
&&&&&&&&&&&&&&&
Marker: 'none'
&&&&&&&&&&&
MarkerSize: 6
MarkerEdgeColor: 'auto'
MarkerFaceColor: 'none'
&&&&&&&&&&&&&&&&
XData: [1x100 double]
&&&&&&&&&&&&&&&&
YData: [1x100 double]
&&&&&&&&&&&&&&&&
ZData: [1x0 double]
BeingDeleted: 'off'
ButtonDownFcn: []
&&&&&&&&&&&&&
Children: [0x1 double]
&&&&&&&&&&&&&
Clipping: 'on'
&&&&&&&&&&&&
CreateFcn: []
&&&&&&&&&&&&
DeleteFcn: []
&&&&&&&&&&&
BusyAction: 'queue'
HandleVisibility: 'on'
&&&&&&&&&&&&&&
HitTest: 'on'
Interruptible: 'on'
&&&&&&&&&&&&&
Selected: 'off'
SelectionHighlight: 'on'
&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&&&&&&
Type: 'line'
UIContextMenu: []
&&&&&&&&&&&&&
UserData: []
&&&&&&&&&&&&&&
Visible: 'on'
&&&&&&&&&&&&&&&
Parent: 170.3105
&&&&&&&&&&&&
XDataMode: 'manual'
&&&&&&&&&&
XDataSource: ''
&&&&&&&&&&
YDataSource: ''
&&&&&&&&&&
ZDataSource: ''
具体每部分的意义如下:
1. DisplayName:
set(h,'DisplayName','Sin Function');
legend show
就是给这个图线起个名字,当运行legend show时,就会显示在legend上。
当绘制很多条图线时,这么做可以避免混乱。 不必在最后用legend函数一一为每条图线命名。
2. Annotation
hAnnotation
= get(h,'Annotation');
hLegendEntry = get(hAnnotation','LegendInformation');
set(hLegendEntry,'IconDisplayStyle','off');
设置为off的话,该线条将不在legend里显示。
3.Color: [0 0
1]&&& 线的颜色
4.LineStyle:
'-'&&& 线型
5.LineWidth: 0.5000 线宽
set(h,'Color','r','LineStyle','--','LineWidth',2.0);
6, Marker:
'none'&&&&
7, MarkerSize:
8, MarkerEdgeColor: 'auto'& 标记的边框颜色
9, MarkerFaceColor: 'none'& 标记的颜色
Marker symbol. Specifies
marks displayed at data points. You can set values for the
Marker property independently from the LineStyle
property. Supported markers are shown in the following table.
Marker Specifier
Description
'square' or
'diamond' or
Upward-pointing triangle
Downward-pointing triangle
Right-pointing triangle
Left-pointing triangle
'pentagram' or
Five-pointed star (pentagram)
'hexagram' or
Six-pointed star (hexagram)
No marker (default)
set(h,'Marker','s',...
'MarkerEdgeColor','k',...
'MarkerFaceColor','g',...
'MarkerSize',10);&&&&&&&&&&
10,x,y,z的数据,做动画的时候可重置这些值。
XData: [1x50 double]
YData: [1x50 double]
ZData: [1x0 double]
x=linspace(pi,2*pi,50);
set(h, 'XData',x,'YData',y);
11.BeingDeleted
on | {off} Read Only
This object is being
deleted. The BeingDeleted property provides a
mechanism that you can use to determine if objects are in the
process of being deleted. MATLAB sets the BeingDeleted
property to on when the object's delete function callback
is called (see the
property). It remains set to
on while the delete function executes, after which the
object no longer exists.
For example, an object's delete function might call other
functions that act on a number of different objects. These
functions might not need to perform actions on objects if the
objects are going to be deleted, and therefore, can check the
object's BeingDeleted property before acting.
BusyAction
cancel | {queue}
Callback routine
interruption. The BusyAction property enables
you to control how MATLAB handles events that potentially interrupt
executing callbacks. If there is a callback function executing,
callbacks invoked subsequently always attempt to interrupt it.
If the Interruptible property of the object whose
callback is executing is set to on (the default), then
interruption occurs at the next point where the event queue is
processed. If the Interruptible property is off,
the BusyAction property (of the object owning the
executing callback) determines how MATLAB handles the event. The
choices are
cancel — Discard the event that attempted to execute a
second callback routine.
queue — Queue the event that attempted to execute a
second callback routine until the current callback finishes.
ButtonDownFcn
string or function handle
Button press callback
function. A callback that executes whenever you press a
mouse button while the pointer is over this object, but not over
another graphics object. See the
property for information
about selecting objects of this type.
See the figure's
property to determine if
modifier keys were also pressed.
This property can be
A string that is a valid MATLAB expression
The name of a MATLAB file
A function handle
Set this property to a function handle that references the
callback. The expressions execute in the MATLAB workspace.
for information on how to use
function handles to define the callbacks.
array of graphics object handles
Children of the bar
object. The handle of a patch object that is the child
of this object (whether visible or not).
If a child object's HandleVisibility property is
callback or off, its handle does not show up in
this object's Children property. If you want the handle in
the Children property, set the root
property to
on. For example:
set(0,'ShowHiddenHandles','on')
{on} | off
Clipping mode. MATLAB
clips graphs to the axes plot box by default. If you set
Clipping to off, portions of graphs can be
displayed outside the axes plot box. This can occur if you create a
plot object, set hold to on, freeze axis scaling
(axis manual), and then create a larger plot
16.CreateFcn
string or function handle
Callback routine executed during
object creation. This property defines a callback that
executes when MATLAB creates an object. You must specify the
callback during the creation of the object. For example,
graphicfcn(y,'CreateFcn',@CallbackFcn)
where @CallbackFcn is a function handle
that references the callback function and
graphicfcn is the plotting function which creates
this object.
MATLAB executes this routine after setting all other object
properties. Setting this property on an existing object has no
The handle of the object whose CreateFcn is being
executed is accessible only through the root
CallbackObject property, which you can query using
for information on how to use
function handles to define the callback function.
string or function handle
Callback executed during object
deletion. A callback that executes when this object is
deleted (e.g., this might happen when you issue a
command on the object, its parent axes, or the
figure containing it). MATLAB executes the callback before
destroying the object's properties so the callback routine can
query these values.
The handle of the object whose DeleteFcn is being
executed is accessible only through the root
property, which can be
queried using .
18.HandleVisibility
{on} | callback | off
Control access to object's handle by
command-line users and GUIs. This property determines
when an object's handle is visible in its parent's list of
children. HandleVisibility is useful for preventing
command-line users from accidentally accessing objects that you
need to protect for some reason.
on — Handles are always visible when
HandleVisibility is on.
callback — Setting HandleVisibility to
callback causes handles to be visible from within callback
routines or functions invoked by callback routines, but not from
within functions invoked from the command line. This provides a
means to protect GUIs from command-line users, while allowing
callback routines to have access to object handles.
off — Setting HandleVisibility to off
makes handles invisible at all times. This might be necessary when
a callback invokes a function that might potentially damage the GUI
(such as evaluating a user-typed string) and so temporarily hides
its own handles during the execution of that function.
Functions Affected by Handle Visibility
When a handle is not visible in its parent's list of children,
it cannot be returned by functions that obtain handles by searching
the object hierarchy or querying handle properties. This includes
, , , , , , , , and .
Properties Affected by Handle Visibility
When a handle's visibility is restricted using callback
or off, the object's handle does not appear in its
parent's Children property, figures do not appear in the
property, objects do not
appear in the root's
property or in the
property, and axes do not
appear in their parent's
Overriding Handle Visibility
You can set the root
property to
on to make all handles visible regardless of their
HandleVisibility settings (this does not affect the values
of the HandleVisibility properties). See also .
Handle Validity
Handles that are hidden are still valid. If you know an object's
handle, you can
its properties and pass it to any function that
operates on handles.
19.HitTest
{on} | off
Selectable by mouse
click. HitTest determines whether this object
can become the current object (as returned by the gco
command and the figure CurrentObject property) as a result
of a mouse click on the objects that compose the area graph. If
HitTest is off, clicking this object selects the
object below it (which is usually the axes containing it).
Interruptible
{on} | off
Callback routine interruption
mode. The Interruptible property controls
whether an object's callback can be interrupted by callbacks
invoked subsequently.
Only callbacks defined for the ButtonDownFcn property
are affected by the Interruptible property. MATLAB checks
for events that can interrupt a callback only when it encounters a
command in the routine. See the
BusyAction property for related information.
Setting Interruptible to on allows any
graphics object's callback to interrupt callback routines
originating from a bar property. Note that MATLAB does not save the
state of variables or the display (e.g., the handle returned by the
command) when an interruption occurs.
21.Selected
on | {off}
Is object selected? When
you set this property to on, MATLAB displays selection
"handles" at the corners and midpoints if the
SelectionHighlight property is also on (the
default). You can, for example, define the ButtonDownFcn
callback to set this property to on, thereby indicating
that this particular object is selected. This property is also set
to on when an object is manually selected in plot edit
22. SelectionHighlight
{on} | off
Objects are highlighted when
selected. When the Selected property is
on, MATLAB indicates the selected state by drawing four
edge handles and four corner handles. When
SelectionHighlight is off, MATLAB does not draw
the handles except when in plot edit mode and objects are selected
User-specified object
label. The Tag property provides a means to
identify graphics objects with a user-specified label. This is
particularly useful when you are constructing interactive graphics
programs that would otherwise need to define object handles as
global variables or pass them as arguments between callbacks. You
can define Tag as any string.
For example, you might create an areaseries object and set the
Tag property.
t = area(Y,'Tag','area1')
When you want to access objects of a given type, you can use
to find the object's handle. The following
statement changes the FaceColor property of the object
whose Tag is area1.
set(findobj('Tag','area1'),'FaceColor','red')
string (read only)
Type of graphics object.
This property contains a string that identifies the class of the
graphics object. For areaseries objects, Type is
'hggroup'.
The following statement finds all the hggroup objects in the
current axes.
t = findobj(gca,'Type','hggroup');
UIContextMenu
handle of a uicontextmenu object
Associate a context menu with this
object. Assign this property the handle of a
uicontextmenu object created in the object's parent figure. Use the
function to create the context menu.
MATLAB displays the context menu whenever you right-click over the
User-specified data. This
property can be any data you want to associate with this object
(including cell arrays and structures). The object does not set
values for this property, but you can access it using the
functions.
{on} | off
Visibility of this object and its
children. By default, a new object's visibility is
on. This means all children of the object are visible
unless the child object's Visible property is set to
off. Setting an object's Visible property to
off prevents the object from being displayed. However, the
object still exists and you can set and query its properties.
{auto} | manual
Use automatic or user-specified
x-axis values. If you specify XData (by
setting the XData property or specifying the x
input argument), MATLAB sets this property to manual and
uses the specified values to label the x-axis.
If you set XDataMode to auto after having
specified XData, MATLAB resets the x-axis ticks to 1:size(YData,1)
or to the column indices of the ZData, overwriting any
previous values for XData.
XDataSource
string (MATLAB variable)
XData to MATLAB
variable. Set this property to a MATLAB variable that
is evaluated in the base workspace to generate the
MATLAB reevaluates this property only when you set it.
Therefore, a change to workspace variables appearing in an
expression does not change XData.
You can use the refreshdata function to force an update
of the object's data. refreshdata also enables you to
specify that the data source variable be evaluated in the workspace
of a function from which you call refreshdata.
YDataSource
string (MATLAB variable)
YData to MATLAB
variable. Set this property to a MATLAB variable that
is evaluated in the base workspace to generate the
MATLAB reevaluates this property only when you set it.
Therefore, a change to workspace variables appearing in an
expression does not change YData.
You can use the refreshdata function to force an update
of the object's data. refreshdata also enables you to
specify that the data source variable be evaluated in the workspace
of a function from which you call refreshdata.
英文部分链接:/access/helpdesk/help/techdoc/ref/areaseriesproperties.html
/access/helpdesk/help/techdoc/ref/plot.html
已投稿到:
以上网友发言只代表其个人观点,不代表新浪网的观点或立场。

我要回帖

更多关于 matlab的plot函数用法 的文章

 

随机推荐