void gr2d() {
gStyle->SetPalette(1);
TCanvas *c = new TCanvas(“c”,“Graph2D example”,1);
TGraph2D *gr = new TGraph2D();
gr->SetPoint(0,1,1,5);
gr->SetPoint(1,1,2,4);
gr->SetPoint(2,1,3,5);
gr->SetPoint(3,2,1,4);
gr->SetPoint(4,2,2,7);
gr->SetPoint(5,2,3,4);
gr->SetPoint(6,3,1,5);
gr->SetPoint(7,3,2,4);
gr->SetPoint(8,3,3,5);
[color=blue] gr->Draw(“surf1”);
gr->Draw(“same cont1”); [/color]
}
i want to draw [size=150][color=blue]surf1 but with a contour view on the top [/color][/size],why can’t work?
Thanks!