GUI常用对象介绍2

 1 %示意line对象的用法
 2 hf=figure;
 3 hl=plot([0:10]);
 4 
 5 %示意line对象的属性
 6 get(hl)
 7 
 8 %设置line的颜色
 9 set(hl,'Color','r');
10 
11 %设置每个点形状
12 set(hl,'Marker','p');
13 
14 %设置颜色
15 set(hl,'MarkerEdgeColor','g','MarkerFaceColor','k')
16 
17 %绘图sin(x)
18 hll=ezplot('sin(x)');%隐函数绘图
19 x=get(hll,'XData');
20 y=get(hll,'YData');
21 
22 figure
23 plot(x,y);
原文地址:https://www.cnblogs.com/wydxry/p/8215041.html