[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2.5.17 Label sample

Label print text at data points. The string may contain ‘%x’, ‘%y’, ‘%z’ for x-, y-, z-coordinates of points, ‘%n’ for point index. The sample code is:

int sample(mglGraph *gr)
{
  mglData ys(10); ys.Modify("0.8*sin(pi*2*x)+0.2*rnd");
  gr->SubPlot(1,1,0,"");  gr->Title("Label plot");
  gr->Box();  gr->Plot(ys," *");  gr->Label(ys,"y=%y");
  return 0;
}
Example of Label()

This document was generated by Autobuild on July 16, 2012 using texi2html 1.82.