12void hist049_Graphics_candle_plot()
16 TDatime dateBegin(2010, 1, 1, 0, 0, 0);
17 TDatime dateEnd(2011, 1, 1, 0, 0, 0);
19 auto h1 =
new TH2I(
"h1",
"Machine A + B", 12, dateBegin.Convert(), dateEnd.Convert(), 1000, 0, 1000);
20 auto h2 =
new TH2I(
"h2",
"Machine B", 12, dateBegin.Convert(), dateEnd.Convert(), 1000, 0, 1000);
22 h1->GetXaxis()->SetTimeDisplay(1);
23 h1->GetXaxis()->SetTimeFormat(
"%d/%m/%y");
24 h1->GetXaxis()->SetNdivisions(-6);
25 h1->GetXaxis()->SetTitle(
"Date [day/month/year]");
28 for (
int i = dateBegin.Convert(); i < dateEnd.Convert(); i += 86400 * 30) {
29 for (
int j = 0; j < 1000; j++) {
30 Rand =
gRandom->Gaus(500 +
sin(i / 10000000.) * 100, 50);
32 Rand =
gRandom->Gaus(500 +
sin(i / 11000000.) * 100, 70);
38 h1->SetBarOffset(-0.25);
40 h1->SetFillStyle(1001);
43 h2->SetBarOffset(0.25);
44 h2->SetLineColor(
kRed);
50 h2->Draw(
"candle3 same");
52 gPad->BuildLegend(0.78, 0.695, 0.980, 0.935,
"",
"f");
This class stores the date and time with a precision of one second in an unsigned 32 bit word (950130...
2-D histogram with an int per channel (see TH1 documentation)
RVec< PromoteType< T > > sin(const RVec< T > &v)