reversegraphaxis () { const Int_t n = 20; Double_t x[n], y[n]; for (Int_t i=0;iSetMarkerStyle(21); g->Draw("APL"); ReverseYAxis(g); ReverseYGraph(g); } ReverseYAxis (TGraph *g) { // Remove the current axis g->GetYaxis()->SetLabelOffset(999); g->GetYaxis()->SetTickLength(0); // Redraw the new axis gPad->Update(); TGaxis *newaxis = new TGaxis(gPad->GetUxmin(), gPad->GetUymax(), gPad->GetUxmin()-0.001, gPad->GetUymin(), g->GetYaxis()->GetXmin(), g->GetYaxis()->GetXmax(), 510,"+"); newaxis->SetLabelOffset(-0.04); newaxis->Draw(); } ReverseYGraph (TGraph *g) { // Create a new graph Int_t n = g->GetN(); Double_t *x = g->GetX(); Double_t *y = g->GetY(); Double_t yr[100]; Double_t dy = g->GetYaxis()->GetXmin()+g->GetYaxis()->GetXmax(); for (Int_t i=0; iSetMarkerStyle(20); gr->SetLineColor(kRed); gr->SetMarkerColor(kRed); gr->Draw("PL"); }