{ TTree *myTree = new TTree(); // adjust name of the file to read and list of variables as appropriate // each variable should correspond to a column in the file, and the // syntax is "v1:v2:v3" where v1, v2, v3 are the names of the variables myTree->ReadFile("random_numbers.dat","r"); // now plot whatever variables you choose. Use the syntax "y:x" for 2D plots myTree->Draw("r"); // you can also change the titles of the axes htemp->GetXaxis()->SetTitle("random number"); htemp->GetYaxis()->SetTitle("#entries"); }