{ TCanvas *can = new TCanvas("can","plotz",900,700); TH2D *blank = new TH2D("h2","plot",100,0.,80.,100,0.,4.); ifstream in; in.open("plot.txt"); Float_t x,y; Int_t nlines = 0; TNtuple *ntuple = new TNtuple("ntuple","ntuple example","x:y"); while(1){ in >>x>>y; if(!in.good()) break; ntuple->Fill(x,y); nlines++; } ntuple->Draw("log10(y/x):x>>h2","x>0"); in.close(); Float_t x_min = 0.1; Float_t x_max = 100.; Int_t bins = 200; Float_t binW = (x_max-x_min)/(float)bins; Double_t x[bins], y[bins]; for(Int_t b=0; b