void plot_track(){ float x[23],xtrack[23],y[23],ytrack[23],z[23],ycor[23]; ifstream track_file; track_file.open("junk2"); for (int i=0;i<23;i++){ track_file >> x[i]; track_file >> xtrack[i]; track_file >> y[i]; track_file >> ytrack[i]; track_file >> z[i]; track_file >> ycor[i]; } TH2F *hr13 = new TH2F("hr13","Track segments", 20,200,410,20,-15.,30); hr13->Draw(); TGraph *g0=new TGraph(23,z,xtrack); g0->SetMarkerStyle(kFullCircle); g0->SetMarkerColor(1); g0->SetLineColor(1); g0->Draw("P"); TGraph *g1=new TGraph(23,z,x); g1->SetMarkerStyle(kOpenTriangleUp); g1->SetMarkerColor(2); g1->SetLineColor(2); g1->Draw("P"); TGraph *g2=new TGraph(23,z,ytrack); g2->SetMarkerStyle(kFullCircle); g2->SetMarkerColor(1); g2->SetLineColor(1); g2->Draw("P"); TGraph *g3=new TGraph(23,z,y); g3->SetMarkerStyle(kOpenTriangleUp); g3->SetMarkerColor(2); g3->SetLineColor(2); g3->Draw("P"); TGraph *g4=new TGraph(23,z,ycor); g4->SetMarkerStyle(kOpenCircle); g4->SetMarkerColor(4); g4->SetLineColor(4); g4->Draw("P"); }