Next: Iris sample, Previous: Label sample, Up: 1D samples [Contents][Index]
Function table draw table with data values. The sample code is:
int sample(mglGraph *gr) { mglData ys(10,3); ys.Modify("0.8*sin(pi*(2*x+y/2))+0.2*rnd"); gr->SubPlot(2,2,0); gr->Title("Table plot"); gr->Table(ys,"y_1\ny_2\ny_3"); gr->Box(); gr->SubPlot(2,2,1); gr->Title("no borders, colored"); gr->Table(ys,"y_1\ny_2\ny_3","r|"); gr->SubPlot(2,2,2); gr->Title("no font decrease"); gr->Table(ys,"y_1\ny_2\ny_3","#"); gr->SubPlot(2,2,3); gr->Title("manual width, position"); gr->Table(0.5, 0.95, ys,"y_1\ny_2\ny_3","#", "value 0.7"); gr->Box(); return 0; }