Next: , Previous: , Up: Vector field samples   [Contents][Index]


3.8.3 Traj sample

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;
}

Example of Traj()