Draw a line in the current plot.
line(points, param1, value1, param2, value2... )
points A four element vector to specify the end points of the line to be drawn, in the form [x1, y1, x2, y2] .
{param1, value1, param2, ...} Parameter value pairs to specify various optional paramaters associated with the line.

The points are in the units of the current data that is being displayed.

The optional parameters are set by specifying the name of the parameter as a string followed by its value. The following paramter-value pairs may be specified. .

>>function fractaltree(n)
>   % Draw a fractal tree of depth n
>   branch([0,0],[0 .5],1,pi/2,0,n)
>   hold off
>>function branch(x,y,len,theta,n,nmax)
>	if(n>=nmax);return;end
>	static;
>	% Draw the line.
>	line([x[1] y[1] x[2] y[2]],'color',red);
>	if(n==0)
>		axis([-1,1,0,2]);
>		axis('square')
>		hold on
>	end
>	len/=2;
>	t1=theta-pi/2;
>	% Recursively draw the branches.
>	for i=1:5
>		t1=t1+pi/6
>		dx=len*cos(t1);
>		dy=len*sin(t1);
>		branch([x[2],x[2]+dx],[y[2],y[2]+dy],len,t1,n+1,nmax);
>	end