11.16 Sample ‘boxplot

Function boxplot draw box-and-whisker diagram.

MGL code:

new a 10 7 '(2*rnd-1)^3/2'
subplot 1 1 0 '':title 'Boxplot plot':box:boxplot a

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 boxplot