{ ifstream in; in.open("textfile.txt"); int n=100; double x1,x2,y; TH1D *h1=new TH1D("",100,0,1); for (int i = 0; i >x1>>x2>>y; h1->Fill(x,y); } //now how can I create an axis where I have x2 values on the x axis of histogram h1? //There's no specific law for the distribution of x2 values, sicne they are measured values. }