11.140 Sample ‘traj

Function traj is 1D analogue of vect. It draw vectors from specified points.

MGL code:

call 'prepare1d'
subplot 1 1 0 '':title 'Traj plot':box:plot x1 y:traj x1 y y1 y2

C++ code:

void smgl_traj(mglGraph *gr)
{
	mglData x,y,y1,y2;	mgls_prepare1d(&y,&y1,&y2,&x);
	if(big!=3)	{gr->SubPlot(1,1,0,"");	gr->Title("Traj plot");}
	gr->Box();	gr->Plot(x,y);	gr->Traj(x,y,y1,y2);
}

Sample traj