Thank you for this really useful information and example. I appreciate the fact that CONT will not draw a contour at zero since it is the zmin in this case.
This, however, was not my main concern. What I criticized was that a CONT plot will show a color on the palette that will never be used in the plot. This isn’t just an aesthetic problem, it is simply wrong. I tried to make this point in my previous two posts. Let me try again with a different story:
Two ROOT users, Dr. Cont and Dr. Col go on a hike. They are given information on the landscape in the form of 2D data. Of course they will draw a histogram of this information. Dr. Cont will draw it in CONTZ option, Dr. Col in COLZ. Before they set out on exploring the landscape, they agree to meet at the north face of the big mountain at an altitude of 100 m. Dr. Col looks at the color palette of his map, concludes that the meeting point is in the middle of the violet band at the north face, therefore starts hiking towards the point (x=-1.5,y=-1). Dr. Cont looks at his map with the very same color palette, also comes to the conclusion that the meeting point must be somewhere in the violet area (color palette says violet from 0 to 200!), but… there is no violet area in his plot!!
Clearly, Dr. Cont is misled by his plot. ROOT gives him a plot with inconsistent information: the color palette says, bins with content between 0 and 200 are colored in violet, but the plot does not do that. And here we don’t care about the color of bins with content = 0, we care about bins with content 20, 50, 120, etc. Real bins with real content are not correctly represented in this plot.
Do you understand my point now? I still believe that there is a need for action to correct this inconsistency: either make sure the plot gives the correct information, i.e. color everything violet in the lowest contour band (preferred solution, to maintain consistency with COL color palette), or correct the color palette: show the white color on the palette for the range 0 to 200 on the scale.
Thank you for reconsidering.
Thomas
void cont11()
{
TCanvas *c1 = new TCanvas("c1","c1",1200,500);
gStyle->SetOptStat(0);
gStyle->SetPalette(1);
TH2F *h1 = new TH2F("h1","h1",40,-4,4,40,-4,4);
Double_t a,b;
for (Int_t i=0;i<306500;i++) {gRandom->Rannor(a,b);h1->Fill(a-1.5,b-1.5);}
for (Int_t i=0;i<550;i++) {h1->Fill(3.5,3);}
for (Int_t i=0;i<450;i++) {h1->Fill(3.5,2);}
for (Int_t i=0;i<350;i++) {h1->Fill(3.5,1);}
for (Int_t i=0;i<250;i++) {h1->Fill(3.5,0);}
for (Int_t i=0;i<150;i++) {h1->Fill(3.5,-1);}
for (Int_t i=0;i< 50;i++) {h1->Fill(3.5,-2);}
for (Int_t i=0;i< 5;i++) {h1->Fill(3.5,-3);}
h1->SetContour(10);
c1->Divide(2,1);
c1->cd(1);
c1_1->SetRightMargin(0.15);
h1->Draw("contz");
c1->cd(2);
c1_2->SetRightMargin(0.15);
h1->Draw("colz");
}