# Empty bins in surf2 plot option

Hi everybody!
I have a 2D histogram with many empty bins. I would like them to appear white when using a rainbow colour palette. In the z scale I have positive and negative values.
If I use the colz option it is colz1, then I manage to make the empty bins appear white. But I would like to use the option surf2 to make maxima and minima more evident. Is there a way to plot the empty bins as white also in this case ?

Thanks

Andrea

In case of surface plot you cannot do that with an option. What you can do if to define your own palette with some specific color (white) at 0.

Thanks for the answer. Is there a tutorial on how to change the Palette ? I was trying this code:

UInt_t Number = 3;
Double_t Red[3] = { 0.00, 0.00, 1.00};
Double_t Green[3] = { 0.00, 1.00, 0.00};
Double_t Blue[3] = { 1.00, 0.00, 1.00};
Double_t Length[3] = { 0.00, 0.50, 1.00 };
Int_t nb=50;
h2->SetContour(nb);
h2->Draw(“surf1z”);

But I could not figure out how to put in white a range of the palette around 0…

Hi! I found
something that works to make the empty point white:

const UInt_t Number = 5;
Double_t Red[Number] = {1.00, 0.00, 1.00, 1.00, 0.00};
Double_t Green[Number] = { 0.00, 1.00, 1.00, 0.00, 0.00};
Double_t Blue[Number] = { 0.00, 0.00, 1.00, 1.00, 1.00};
Double_t Length[Number] = { 0.00, 0.48, 0.52, 0.55, 1.00 };
Int_t nb=50;