SetBinContent and bin problems

Hi,

I have a question about SetBinContent and bin location in the graph.
The data is

TGraphErrors* pip_10;
pip_10->SetPoint(0, 0.15, 4.70);
pip_10->SetPointError(0, 0, 0.023);

pip_10->SetPoint(1, 0.25, 5.80);
pip_10->SetPointError(1, 0, 0.025);

pip_10->SetPoint(2, 0.40, 4.00);
pip_10->SetPointError(2, 0, 0.022);

and
for (Int_t i=1; i< 20; i++)
{

bin = int((piplus->GetX()[i])10.0)+1;
multi->SetBinContent(bin, 3, piplus->GetY()[i]);

}
then,
multi->Draw();

In this case, how can I determine the x position in the graph multi?
y values are fine but x values are wrong. So, I would like to know
how to fix the x positions through bin number and bin width.
The x values of each data difference is not same
which means
(x1, y1), (x2, y2), (x3,y3)
x2-x1 is not same as x3-x2.

Thank you!

TGraph::GetX() returns the X data points of a TGraph (pointer to an array), that’s already the X positions. There no bins involved in that case.

Thank you so much!