Example showing how a THStack with candle plot option.
void candleplotstack()
{
int bins = 1000;
float Rand;
for (
int i = dateBegin->
Convert(); i < dateEnd->
Convert(); i+=86400*30) {
for (int j = 0; j < 1000; j++) {
Rand = randnum->
Gaus(500+
sin(i/10000000.)*100,50); h1->
Fill(i,Rand); hsum->Fill(i,Rand);
Rand = randnum->
Gaus(500+
sin(i/12000000.)*100,50); h2->Fill(i,Rand); hsum->Fill(i,Rand);
}
}
h2->SetLineColor(kRed);
hs->
Add(hsum,
"violin1");
gPad->BuildLegend(0.75,0.75,0.95,0.95,
"");
}
- Authors
- Georg Troska, Olivier Couet
Definition in file candleplotstack.C.