ROOT ignores my timeoffset, for a TGraph I used to do gStyle->SetTimeOffset(timeoffset); but for TMultigraph it doesn’t work
I want to enable a timedisplay on my x axis, but I get a segmentation violation when I try to. I found on google that I should use gPad->Update(); before using the function GetXaxis(), however this did not work. My temporary solution for this is to use Draw(), then access the axis and then Draw() again…
{
TMultiGraph* mg = new TMultiGraph;
TGraph* g = new TGraph;
for (int i = 0; i < 100; i++) g->SetPoint(i, 1289420808+i, i+2);
mg->Add(g, "P");
mg->Draw("AP");
mg->GetXaxis()->SetTimeDisplay(1);
gPad->Modified();
gPad->Update();
}