Coloring White Spots in TH2F

Hello all, I am filling in a TH2F 2D Histogram that is a projection from a TH3F. I am getting these
results using COLZ draw options. I am trying SURF1 but it is giving me a 3D plot. I want to maintain it as a 2D plot. But I want the white spots also to be colored blue since they are empty. Do you have any suggestions if there are other Draw Options or if I need to do something manually to fill in the empty bins?

Here are the results:

This behavior is intentional. You can find the explanation here. Empty bins are not drawn with the COL option unless the minimum value of the histogram is negative. What you’re seeing are not “white” spots but bins that are simply not drawn. A possible workaround is to set the background color of your canvas to match the color of the minimum in your palette. Alternatively, you could try setting the minimum value to a small positive number (e.g., 0.001), which may also solve the issue.

Thank you for the suggestions. I tried both but neither of them worked. Setting the minimum value and the canvas background color, colors even the sides of the canvas but not the histogram. And setting the fill color of the histogram also does nothing. Any other suggestions?

I went back and set the minimum to be 0, and if the content of the bins is 0 i set it manually to be 0.1 and I got this.

Thank you for the help!

Keep in mind that by doing this, you will no longer be able to distinguish between empty bins and bins filled with the minimum value. It’s somewhat like “cheating” with the data representation. However, if you prefer this type of plot for aesthetic or practical reasons, that’s your choice.

Yes exactly, I just want it to look pretty :smile: