Dear experts,
I want to get the max and min value along the y axis in my graph, but when I used the GetMinimum() and GetMaximum() methods both return -1111. Isn’t it suppose to return the min and max value.
Here [1] is a piece of code, could you please tell me if something is wrong? I’m using ROOT 6.02/05.
Regards
[1]
void graph(){
TGraphErrors *graph = new TGraphErrors(28);
int i{0};
for (int pt=10; pt<150; pt+=5) {
graph->SetPoint( i, pt, pt);
i++;
}
cout<<“min/max: “<< graph->GetMinimum()<<”/”<< graph->GetMaximum()<<endl; // -1111/-1111
}