{ double gallong; double gallat; double x40d, y40d, x70d, y70d, x100d, y100d; vector x40; vector y40; vector x70; vector y70; vector x100; vector y100; vector gallongv; vector gallatv; double temp1, temp2, temp3,temp4,temp5; ifstream in; in.open("/home/macolino/Work_stuff/work0/anisotropy/autocorrelation/eventi/evs.nov08.sort.dat"); //while((in.good()) while(1) { if (! in.good()) break; in>>temp1>>temp2>>temp3>>temp4>>temp5; in>>gallong>>gallat; //cout<40.0) { x40.push_back(gallong); y40.push_back(gallat); } if(temp3>70.0) { x70.push_back(gallong); y70.push_back(gallat); } if(temp3>100.0){ x100.push_back(gallong); y100.push_back(gallat); } } in.close(); int n=gallongv.size(); cout<GetXaxis()->SetTitle("Galactic Longitude [#circ]"); plotevents->GetYaxis()->SetRangeUser(-90.,90.); plotevents->Draw("AP"); // Remove the current axis plotevents->GetXaxis()->SetLabelOffset(999); plotevents->GetXaxis()->SetTickLength(0); // Redraw the new axis gPad->Update(); /*TGaxis *newaxis = new TGaxis(gPad->GetUxmax(), gPad->GetUymin(), gPad->GetUxmin(), gPad->GetUymin(), plotevents->GetXaxis()->GetXmin(), plotevents->GetXaxis()->GetXmax(), 510,"-SDH");*/ TGaxis *newaxis = new TGaxis(gPad->GetUxmax(), gPad->GetUymin(), gPad->GetUxmin(), gPad->GetUymin(), -180, 180, 510,"-SDH"); newaxis->SetLabelOffset(-0.03); newaxis->Draw(); TGraph *plotevents2=new TGraph(n4, x4x, y4y); plotevents2->SetMarkerColor(4); plotevents2->SetMarkerStyle(8); plotevents2->Draw("P"); TGraph *plotevents3=new TGraph(n7, x7x, y7y); plotevents3->SetMarkerColor(3); plotevents3->SetMarkerStyle(8); plotevents3->Draw("P"); TGraph *plotevents3=new TGraph(n10, x10x, y10y); plotevents3->SetMarkerColor(6); plotevents3->SetMarkerStyle(8); plotevents3->Draw("P"); }