30 script_time = time(0);
31 script_time = 3600*(
int)(script_time/3600);
37 auto ct =
new TCanvas(
"ct",
"Time on axis",10,10,700,900);
47 auto ht =
new TH1F(
"ht",
"Love at first sight",3000,0.,2000.);
48 for (i=1;i<3000;i++) {
51 noise += 1000*
sin((i-700)*6.28/30)*
exp((
double)(700-i)/300);
53 ht->SetBinContent(i,noise);
57 ht->GetXaxis()->SetLabelSize(0.05);
63 ht->GetXaxis()->SetTimeDisplay(1);
70 x[i] =
sin(i*4*3.1415926/50)*
exp(-(
double)i/20);
74 gt->SetTitle(
"Politics");
79 gt->GetXaxis()->SetLabelSize(0.05);
81 gt->GetXaxis()->SetTimeDisplay(1);
88 TDatime dateBegin(2000,1,1,0,0,0);
90 TDatime datePnt(2000 + i,1,1,0,0,0);
91 gt2->AddPoint(datePnt.Convert() - dateBegin.Convert(), 100 +
gRandom->
Gaus(500,100)*i);
93 gt2->SetTitle(
"Number of monkeys on the moon");
95 gt2->SetMarkerColor(4);
96 gt2->SetMarkerStyle(29);
97 gt2->SetMarkerSize(1.3);
99 gt2->GetXaxis()->SetLabelSize(0.04);
100 gt2->GetXaxis()->SetNdivisions(10);
102 gt2->GetXaxis()->SetTimeDisplay(1);
125 gt2->GetXaxis()->SetTimeFormat(
"%d/%m/%Y %F2000-01-01 00:00:00");
R__EXTERN TRandom * gRandom
R__EXTERN TStyle * gStyle
This class stores the date and time with a precision of one second in an unsigned 32 bit word (950130...
A TGraph is an object made of two arrays X and Y with npoints each.
1-D histogram with a float per channel (see TH1 documentation)
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.
void SetTitleH(Float_t h=0)
RVec< PromoteType< T > > exp(const RVec< T > &v)
RVec< PromoteType< T > > sin(const RVec< T > &v)