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

2.5.13 Candle sample

Function candle draw candlestick chart. This is a combination of a line-chart and a bar-chart, in that each bar represents the range of price movement over a given time interval. The sample code is:

int sample(mglGraph *gr)
{
  mglData y(30);  gr->Fill(y,"sin(pi*x/2)^2");
  mglData y1(30); gr->Fill(y1,"v/2",y);
  mglData y2(30); gr->Fill(y2,"(1+v)/2",y);
  gr->SubPlot(1,1,0,"");  gr->Title("Candle plot (default)");
  gr->SetRange('y',0,1);  gr->Box();  gr->Candle(y,y1,y2);
  return 0;
}
Example of Candle()

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

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