void candleplot() {
auto h1 =
new TH2I(
"h1",
"Machine A + B",12,dateBegin.Convert(),dateEnd.Convert(),1000,0,1000);
auto h2 =
new TH2I(
"h2",
"Machine B",12,dateBegin.Convert(),dateEnd.Convert(),1000,0,1000);
float Rand;
for (int i = dateBegin.Convert(); i < dateEnd.Convert(); i+=86400*30) {
for (int j = 0; j < 1000; j++) {
Rand =
gRandom->
Gaus(500+sin(i/11000000.)*100,70); h2->Fill(i,Rand);
}
}
h2->Draw(
"candle3 same");
gPad->BuildLegend(0.78,0.695,0.980,0.935,
"",
"f");
}
R__EXTERN TRandom * gRandom
R__EXTERN TStyle * gStyle
virtual void SetNdivisions(Int_t n=510, Bool_t optim=kTRUE)
Set the number of divisions for this axis.
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
virtual void SetFillStyle(Style_t fstyle)
Set the fill area style.
virtual void SetTimeDisplay(Int_t value)
virtual void SetTimeFormat(const char *format="")
Change the format used for time plotting.
This class stores the date and time with a precision of one second in an unsigned 32 bit word (950130...
virtual void SetBarOffset(Float_t offset=0.25)
Set the bar offset as fraction of the bin width for drawing mode "B".
virtual Int_t Fill(Double_t x)
Increment bin with abscissa X by 1.
void Draw(Option_t *option="") override
Draw this histogram with options.
virtual void SetBarWidth(Float_t width=0.5)
Set the width of bars as fraction of the bin width for drawing mode "B".
2-D histogram with an int per channel (see TH1 documentation)
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
virtual Double_t Gaus(Double_t mean=0, Double_t sigma=1)
Samples a random number from the standard Normal (Gaussian) Distribution with the given mean and sigm...
void SetTimeOffset(Double_t toffset)
Change the time offset for time plotting.