{ TCanvas *c1 = new TCanvas("c1", "c1",80,80,500,500); FILE *fp=fopen("data.dat","r"); TFile *f=new TFile("data.root","RECREATE"); TTree *t=new TTree("T","data from ascii file"); Float_t x[8][3]; t.Branch("x",x,"x[8][3]/F"); UShort_t i,j,r; for(r=0;r<2000;r++) { for(i=0;i<8;i++) { for(j=0;j<3;j++) { fscanf(fp,"%f",&x[i][j]); printf("%.3f ",x[i][j]); } } printf("\n"); t->Fill(); } for(i=0;i<1;i++) { t->Draw("x[i][1]:x[i][2]:x[i][0]",i); } //t->Draw("x[1][1]:x[1][2]:x[1][0]","","same"); //t->Draw("x[2][1]:x[2][2]:x[2][0]","","same"); //t->Draw("x[3][1]:x[3][2]:x[3][0]","","same"); //t->Draw("x[4][1]:x[4][2]:x[4][0]","","same"); //t->Draw("x[5][1]:x[5][2]:x[5][0]","","same"); //t->Draw("x[6][1]:x[6][2]:x[6][0]","","same"); // t->Draw("x[7][1]:x[7][2]:x[7][0]","","same"); // t->Draw("x[8][1]:x[8][2]:x[8][0]","","same"); }