GetContourLevel not working

I’m having an error with the following script. Basically, I have several 2D profile histograms that I want to plot on the same axis. I plot the first one and then grab the contour levels from it to use as the levels for the following. For some reason, when I run this as a script, it reads ‘0’ for every level but when I run it in the terminal I can get the levels out properly. In other words, if I run the script and then type ‘prof0-GetContourLevel(1)’ I get the correct number but if I put this same line in the script than it will always give 0. It works if I set up the levels manually.

[quote]
Double_t levels[20];
Double_t level;
prof->Draw(“axis”);
prof->SetStats(0);
prof0->Draw(“colsz,same”);
for(i=0;i<20;i++){
levels[i] = prof0->GetContourLevel(i);
cout << i << " " << levels[i] << " " << prof0->GetContourLevel(i) << endl;
}
prof1->SetContour(20,levels);
prof2->SetContour(20,levels);
prof3->SetContour(20,levels);
prof4->SetContour(20,levels);
prof5->SetContour(20,levels);
prof6->SetContour(20,levels);
prof7->SetContour(20,levels);
prof8->SetContour(20,levels);
prof9->SetContour(20,levels);
prof10->SetContour(20,levels);
prof11->SetContour(20,levels);
prof12->SetContour(20,levels);
prof13->SetContour(20,levels);
prof14->SetContour(20,levels);
prof1->Draw(“cols,same”);
prof2->Draw(“cols,same”);
prof3->Draw(“cols,same”);
prof4->Draw(“cols,same”);
prof5->Draw(“cols,same”);
prof6->Draw(“cols,same”);
prof7->Draw(“cols,same”);
prof8->Draw(“cols,same”);
prof9->Draw(“cols,same”);
prof10->Draw(“cols,same”);
prof11->Draw(“cols,same”);
prof12->Draw(“cols,same”);
prof13->Draw(“cols,same”);
prof14->Draw(“cols,same”);[/quote]

Can you send me the histogram prof0 ? (in a root file)

Here’s the historgram.
prof0.root (6.95 KB)

Your file contains only one TProfile2D "Profile0"
Could you send a short script and the necessary file(s) (as short as possible)
reproducint the problem described in your original mail?

Rene