30 script_time = time(0);
31 script_time = 3600*(int)(script_time/3600);
35 gStyle->SetTimeOffset(script_time);
37 TCanvas *ct =
new TCanvas(
"ct",
"Time on axis",10,10,700,900);
45 gStyle->SetTitleH(0.08);
47 TH1F *ht =
new TH1F(
"ht",
"Love at first sight",3000,0.,2000.);
48 for (i=1;i<3000;i++) {
49 noise = gRandom->Gaus(0,120);
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);
71 t[i] = 6000+(double)i/20;
73 TGraph *gt =
new TGraph(100,t,x);
74 gt->SetTitle(
"Politics");
79 gt->GetXaxis()->SetLabelSize(0.05);
81 gt->GetXaxis()->SetTimeDisplay(1);
89 x2[i] = gRandom->Gaus(500,100)*i;
92 TGraph *gt2 =
new TGraph(10,t2,x2);
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.05);
101 gt2->GetXaxis()->SetTimeDisplay(1);
124 gt2->GetXaxis()->SetTimeFormat(
"y. %Y %F2000-01-01 00:00:00");