| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Statistics Toolbox |
| Contents | Index |
| Learn more about Statistics Toolbox |
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')

![]() | gevstat | glmfit | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |