| Contents | Index |
gline(h)
gline
hline = gline(...)
gline(h) allows you to draw a line segment in the figure with handle h by clicking the pointer at the two endpoints. A rubber-band line tracks the pointer movement.
gline with no input arguments defaults to h = gcf and draws in the current figure.
hline = gline(...) returns the handle hline to the line.
Use gline to connect two points in a plot:
x = 1:10; y = x + randn(1,10); scatter(x,y,25,'b','*') lsline mu = mean(y); hold on plot([1 10],[mu mu],'ro') hline = gline; % Connect circles set(hline,'Color','r')

| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |