Dear rooters,
run this macro and look at the result:
{
TGraphErrors *ge = new TGraphErrors(2);
ge->SetName("aaa"); // <<< without this it works
ge->SetPoint(1, 1, 1);
ge->SetPoint(2, 2, 1);
TCanvas *c = new TCanvas();
ge->Draw("ap*");
c->Update();
ge->SavePrimitive(cout);
}
I get:
TH1F *aaa1__1 = new TH1F("aaa1__1","Graph",100,0,2.2);
aaa1__1->SetMinimum(0);
..
gre->SetHistogram(aaa1);
Nota bene:
TH1::SavePrimitive sets a different histo name.
This only happens if the graphs name is set.
Bug or feature??
Cheers
Otto