From: lily on 7 Jan 2010 02:42 > % the data > x=0:10:360; > y=sin(pi*x/180); > ix=randperm(numel(x)); > ix=ix(1:9); > % the plot > % - line #1 > ph=line(x,y,... > 'marker','s',... > 'markersize',20,... > 'markerfacecolor',[0,0,0]); > % - line #2 > line(x(ix),y(ix),... > 'marker','o',... > 'markersize',10,... > 'markerfacecolor',[1,1,0],... > 'linestyle','none'); > % the legend > lh=legend(ph,'double legend'); > ch=findall(lh,'type','line','marker','s'); && when change 's' as 'o', why can't get the data of line #2? > xp=get(ch,'xdata'); > yp=get(ch,'ydata'); && here (xp,yp) mean the points of line #1? totally 36 points? > % - add handle props/vals from line #2 > line(xp,yp,... > 'parent',lh,... && line(...) is create line object, and why legend is changed? && here create line #3,isn't line #3 the same as lline #1? they have the same data. && will line #3 cover the line #2 && why set its marker as 'o', what needed is not the data of line #2? && what is the function of 'parent',lh,... here? > 'marker','o',... > 'markersize',10,... > 'markerfacecolor',[1,1,0],... > 'linestyle','none'); > > us Could you please explain in more detail, I have read it several times but still don't get it, especially the last two sections,thanks very much.
|
Pages: 1 Prev: SimCoupler, Connecting PSIM and SimpowerSys Next: Filter2 in cell array |