11.15 Sample ‘box

Different styles of bounding box.

MGL code:

subplot 2 2 0:title 'Box (default)':rotate 50 60:box
subplot 2 2 1:title 'colored':rotate 50 60:box 'r'
subplot 2 2 2:title 'with faces':rotate 50 60:box '@'
subplot 2 2 3:title 'both':rotate 50 60:box '@cm'

C++ code:

void smgl_boxplot(mglGraph *gr)	// flow threads and density plot
{
	mglData a(10,7);	a.Modify("(2*rnd-1)^3/2");
	if(big!=3)	{	gr->SubPlot(1,1,0,"");	gr->Title("Boxplot plot");	}
	gr->Box();	gr->BoxPlot(a);
}

Sample box