11.62 Sample ‘grad

Function grad draw gradient lines for matrix.

MGL code:

call 'prepare2d'
subplot 1 1 0 '':title 'Grad plot':box:grad a:dens a '{u8}w{q8}'

C++ code:

void smgl_grad(mglGraph *gr)
{
	mglData a;	mgls_prepare2d(&a);
	if(big!=3)	{gr->SubPlot(1,1,0,"");	gr->Title("Grad plot");}
	gr->Box();	gr->Grad(a);	gr->Dens(a,"{u8}w{q8}");
}

Sample grad