Example of candle plot with 2-D histograms.
void candleplot() {
float Rand;
for (
int i = dateBegin->
Convert(); i < dateEnd->
Convert(); i+=86400*30) {
for (int j = 0; j < 1000; j++) {
Rand = rand->
Gaus(500+
sin(i/10000000.)*100,50); h1->
Fill(i,Rand);
Rand = rand->
Gaus(500+
sin(i/11000000.)*100,70); h2->Fill(i,Rand);
}
}
h2->SetBarWidth(0.4);
h2->SetBarOffset(0.25);
h2->SetLineColor(kRed);
h2->Draw("candle3 same");
gPad->BuildLegend(0.78,0.695,0.980,0.935,
"",
"f");
}
- Author
- Georg Troska
Definition in file candleplot.C.