How to extract values on the X-axis?

I want to compare two results (experimental and calculation), but I have the problem that the measurement points are in comma on the X-axis
I cannot have the values calculated at the same point to calculate the difference between the two results.
can I have the value of Y corresponding to a value of X-axis without comma for example the points: 1, 2, 3, 4, 10, 20 …?

Please read tips for efficient and successful posting and posting code

ROOT Version: Not Provided
Platform: Not Provided
Compiler: Not Provided

Using TGraph::Eval may help.

1 Like

thank you very much, i use `

TGraph :: Eval

` it works very well

Double_t ev,x;
   for ( Int_t k = 0; k < 70; k++) {
      x = (Double_t)k;
      ev = gr->Eval(x);
      printf("ev[%d] = %g\n", k, ev);

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.