{ TGraph *graph_1 = new TGraph; TGraph *graph_2 = new TGraph; graph_1->SetMarkerStyle(kFullCircle); graph_1->SetMarkerColor(kRed+1); graph_2->SetMarkerStyle(kOpenCircle); graph_2->SetMarkerColor(kBlue+1); gStyle->SetTimeOffset(0); TDatime thedate(2016,4,1, 12,00,00); graph_1->SetPoint(0, thedate.Convert(), 1.1); graph_2->SetPoint(0, thedate.Convert(), 0.2); thedate.Set(2016,4,5, 12,00,00); graph_1->SetPoint(1, thedate.Convert(), 2.1); graph_2->SetPoint(1, thedate.Convert(), -0.1); thedate.Set(2016,4,9, 12,00,00); graph_1->SetPoint(2, thedate.Convert(), 2.7); graph_2->SetPoint(2, thedate.Convert(), 0.2); thedate.Set(2016,4,11, 12,00,00); graph_1->SetPoint(3, thedate.Convert(), 2.9); graph_2->SetPoint(3, thedate.Convert(), 0.1); TCanvas *cTimeAxisCan = new TCanvas("cTimeAxisCan","time evolution"); // cTimeAxisCan->cd(); TMultiGraph *mg = new TMultiGraph("mg", "WTF?;Day in 2016;something?"); mg->Add(graph_1); mg->Add(graph_2); mg->Draw("AP"); gPad->Modified(); gPad->Update(); // make sure it's really (re)drawn TAxis *axis = mg->GetXaxis(); axis->SetTimeDisplay(1); axis->SetTimeFormat("%d/%m"); axis->SetNdivisions(204,false); // axis->SetTitle("Day in 2016"); gPad->Modified(); gPad->Update(); // make sure it's really (re)drawn cTimeAxisCan->Print("TimeEvolution.png"); }