Next: Flow sample, Previous: Vect3 sample, Up: Vector field samples [Contents][Index]
Function traj is 1D analogue of Vect. It draw vectors from specified points. The sample code is:
int sample(mglGraph *gr)
{
mglData x,y,y1,y2; mgls_prepare1d(&y,&y1,&y2,&x);
gr->SubPlot(1,1,0,""); gr->Title("Traj plot");
gr->Box(); gr->Plot(x,y); gr->Traj(x,y,y1,y2);
return 0;
}