void multi5() { gStyle->SetOptStat(0); gStyle->SetCanvasPreferGL(kTRUE); TCanvas *c = new TCanvas("c","c",0,0,1000,800); TH2F *frame = new TH2F ("frame","Example of two surface on the same plot",20,1,3,20,1,3); frame->SetMaximum(1.2); TF2 *f1 = new TF2("f1","0.1+(1-(x-2)*(x-2))*(1-(y-2)*(y-2))",1,3,1,3); TF2 *f2 = new TF2("f2","0.1+(2-(x-3)*(x-3))*(2-(y-3)*(y-3))",2,4,2,4); f1->SetLineWidth(1); f1->SetLineColor(kBlue); f2->SetLineWidth(1); f2->SetLineColor(kBlack); frame->Draw("lego0"); TExec *ex1 = new TExec("ex1","gStyle->SetPalette(55, 0, 0.5);"); ex1->Draw(); f1->Draw("surf2 same fb bb"); TExec *ex2 = new TExec("ex2","gStyle->SetPalette(75, 0, 0.5);"); ex2->Draw(); f2->Draw("surf2 same fb bb"); }