Currently I use this to add points to a TGraph *:
tgraph->SetPoint(i,x,y)
Is there a way to do this without having to keep track of the index i? That is, can you do
tgraph->AddPoint(x,y)
?
Currently I use this to add points to a TGraph *:
tgraph->SetPoint(i,x,y)
Is there a way to do this without having to keep track of the index i? That is, can you do
tgraph->AddPoint(x,y)
?
You can do
g->SetPoint(g->GetN(), x,y)
That’s what I do 95% of the time. Perhaps such a default method could be added to ROOT?
thanks – that’s what I wanted