2D colored histo

I have a 2D colored histogram with dedicated colors.
histogram is filled by numbers from 0 to 100
and i would like to have different color for bin where went 0 from bin color which not got any entry
how can i do it?
thanks in advance

Do you mean that you want to draw 2D color.

Try using the option “colz” as the argument to your call to TH2::Draw()… So,
TH2 h;
//fill you histogram

thanks but i know that. i just want to have color for bin which i fill with 0 and no color for bin which I didn’t fill

TH2F *h = new TH2F(“h”, “t”, 2,0,2,2,0,2);

bin contents alway is from 0 to 100 and i have some bins without any entry

I see - sorry I didn’t understand your original question.

I think that is more difficult. What about giving your unfilled bins a content value of -1?

yes, it can be solution, but in my case i never know which bin will be unfiled

If a bin contains 0 we cannot know if it has bin filled or not.

In theory, one can use root.cern.ch/root/html/TH1.html#TH1:Sumw2 h->Fill(2,1,-1); h->Fill(2,1,+1); to get the “filled” zero or savannah.cern.ch/bugs/?51455

I will…