manpagez: man pages & more
info mathgl_en
Home | html | info | man
[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2.6.11 Cont sample

Cont draw contour lines for surface. You can select automatic (default) or manual levels for contours, print contour labels, draw it on the surface (default) or at plane (as Dens). The sample code is:

int sample(mglGraph *gr)
{
  mglData a,v(5); mgls_prepare2d(&a); v.a[0]=-0.5;  v.a[1]=-0.15; v.a[2]=0; v.a[3]=0.15;  v.a[4]=0.5;
  gr->SubPlot(2,2,0); gr->Title("Cont plot (default)");
  gr->Rotate(50,60);  gr->Box();  gr->Cont(a);

  gr->SubPlot(2,2,1); gr->Title("manual levels");
  gr->Rotate(50,60);  gr->Box();  gr->Cont(v,a);

  gr->SubPlot(2,2,2); gr->Title("'\\_' style");
  gr->Rotate(50,60);  gr->Box();  gr->Cont(a,"_");

  gr->SubPlot(2,2,3,"");  gr->Title("'t' style");
  gr->Box();  gr->Cont(a,"t");
  return 0;
}
Example of Cont()

This document was generated on April 13, 2012 using texi2html 5.0.

© manpagez.com 2000-2024
Individual documents may contain additional copyright information.