manpagez: man pages & more
info mathgl_en
Home | html | info | man
[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2.5.19 Table sample

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;
}
Example of Table()

This document was generated on March 21, 2014 using texi2html 5.0.

© manpagez.com 2000-2024
Individual documents may contain additional copyright information.