11.24 Sample ‘cont

Function 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).

MGL code:

call 'prepare2d'
list v -0.5 -0.15 0 0.15 0.5
subplot 2 2 0:title 'Cont plot (default)':rotate 50 60:box:cont a
subplot 2 2 1:title 'manual levels':rotate 50 60:box:cont v a
subplot 2 2 2:title '"\_" and "." styles':rotate 50 60:box:cont a '_':cont a '_.2k'
subplot 2 2 3 '':title '"t" style':box:cont a 't'

C++ code:

void smgl_cont3(mglGraph *gr)
{
	mglData c;	mgls_prepare3d(&c);
	if(big!=3)	gr->Title("Cont3 sample");
	gr->Rotate(50,60);	gr->Box();
	gr->Cont3(c,"x");	gr->Cont3(c);	gr->Cont3(c,"z");
}
Sample cont