TProfile2D: contours at z=0

Hello,

The attached plot shows the results of
TProfile2D::Draw(“contz”);

The colors around a z-value of 0 are not drawn correctly. They are white instead of the green that I would expect (and want!) from the palette on the right side. The bin-count for bins at z=0 is larger than 0, i.e. they are filled. So, they should be a green color and not the white, which I think means “empty bin”. I have also attached a 3-d view of the TProfile (surf2z) for better illustration. (This appears first in the post, eventhough I added it last…)

Thanks for your help.

Martin



Could you post your canvas.root file instead of the png file, such that it will be easy to figure out what you mean?

Rene

Hi Rene,
here is the fCanvas1.root file.

Thank you,
Martin
fCanvas1.root (27.9 KB)

Use:
TProfile2D::Draw(“cont4z”);
CONT4 uses the same algorithm as the 3D surfaces drawing.
CONT does not paint the empty bins.

Cont4z and surf2z produce a flat surface at z=0. I don’t want this for bins that are empty. The z-value in my TProfile2D goes through 0, but not all bins at z=0 are filled. From the cont4 and surf2 it is impossible to tell wether the z-value is 0 or wether the bin are empty.

So, I want to suppress empty bins in a contour plot for TProfile2D. Is this possible?

Thanks!
MS

Seems to me you asked exactly the opposite in your first message:

So if you want the bins containing 0 being white use option the CONT. If you want them green use option CONT4.

NOTE: There is no way to make the difference between an empty bin (never touched by Fill() ) and a bin which is 0 because the sum of all the Fill() is 0.

<== This was what I wanted. I have a hard time expressing myself clearly. :: So, I have a feature request, then? Should I submit it separately to the feature request mailing list?

Regards,
M S

Yes, that is not a drawing matter.