11.69 Sample ‘iris

Function iris draw Iris plot for columns of data array.

MGL code:

read a 'iris.dat'
crop a 0 4 'x':rearrange a a.nx 50
subplot 1 1 0 '':title 'Iris plot'
iris a 'sepal\n length;sepal\n width;petal\n length;petal\n width' '. ';value -1.5;size -2

C++ code:

void smgl_iris(mglGraph *gr)
{
	mglData a("iris.dat");	a.Crop(0,4,'x');	a.Rearrange(4,50);
	gr->SubPlot(1,1,0,"");
	if(big!=3)	gr->Title("Iris sample");
	gr->Iris(a, "sepal\nlength;sepal\nwidth;petal\nlength;petal\nwidth", ". ", "value -1.5;size -2");
}

Sample iris