# SetPalette

G
Hi,
I needed to fill a Th2D and to read the zvalues from 1 down to 1e^{-4}.
If I try with gStyle->SetPalette(1000) the palette is down to 0.01.
How could I solve this?
thanks a lot

gStyle->SetPalette is not meant to be used that way (see the help). I am not sure to understand what you want to do exactly. Is it h->SetMinimum() ?
Can you provide a small running example showing your problem ?

Hi,
unfortunately I wonâ€™t be able to give you a small example for now, but I try to be more clear.
I obtain zvalues with a minimu around 10^(-4) but when I plot the 2dhisto with setPalette(50) the number of colors is not sufficient to show all the values around the minimum.
Is it possible to have a palette with a greater number of colors ?

thanks

You can change the number of contours like in the following example:

``````{
TCanvas *c = new TCanvas("c","Contours",600,0,600,600);
TF2 *f1 = new TF2("f2","0.1+(1-(x-2)*(x-2))*(1-(y-2)*(y-2))",1,3,1,3);
const Int_t Number = 5;
Double_t Red[Number] = { 0.00, 0.09, 0.18, 0.09, 0.00 };
Double_t Green[Number] = { 0.01, 0.02, 0.39, 0.68, 0.97 };
Double_t Blue[Number] = { 0.17, 0.39, 0.62, 0.79, 0.97 };
Double_t Stops[Number] = { 0.00, 0.34, 0.61, 0.84, 1.00 };
Int_t nb=50;