void TestContour(const char *inputFile){ gStyle->SetStripDecimals(0); TCanvas *c1 = new TCanvas("c1","A Simple Graph Example",760,550); c1->SetLogz(); c1->SetTickx(); c1->SetTicky(); c1->SetRightMargin(0.10); TGraph2D *g_temp = new TGraph2D(inputFile,"%lg %lg %lg"); g_temp->SetTitle("Contour in #Lambda-#sqrt{s} plane"); g_temp->GetHistogram()->GetXaxis()->SetTitle("#sqrt{s}(TeV)"); g_temp->GetHistogram()->GetYaxis()->SetTitle("#Lambda ( TeV)"); g_temp->GetHistogram()->GetZaxis()->SetTitle(" #sigma (pb)"); g_temp->GetHistogram()->GetZaxis()->CenterTitle(); //g_temp->GetHistogram()->GetZaxis()->SetTitleOffset(0.6); // g_temp->SetTitle("Contour in M_{#chi}-#sqrt{s} plane; #sqrt{s}(GeV) ; M_{#chi}(GeV);#sigma(pb)"); g_temp->Draw("COLZ"); // "pcolz" or "colz" or "surf1z" or ... TPaveText *pt = new TPaveText(0.02,0.93,0.22,0.98,"brNDC"); // pt->SetLabel("Signal"); pt->AddText("M = 100 GeV"); pt->SetTextColor(1); pt->SetTextSize(0.03); pt->SetShadowColor(0); pt->Draw(); //g_temp->GetHistogram()->SetContour(90); c1->SaveAs(".png"); }