Hello,
I am using TGraph to plot metrics in time.
In order to be able to update the plot even when the array associated to the TGraph is not completely filled I do:
Double_t x[max], y[max];
x[0] = 0;
y[0] = 0;
gr = new TGraph(1, x, y);
and every time that I assign a value to x[i] and y[i] I do:
gr->SetPoint(i, x[i], y[i]);
when I arrive to the end of the array, that means i=max, I reinitialize i to 0 and start again filling the array.
The result on the plot is that when I assign again x[0] and y[0], the curve of the plot is connecting y[0] which is at the end of the plot and y[1] which is at the beginning.
Is there a way to avoid this?
Thank you
Adriana