#include "TStyle.h"
#include "TColor.h"
Go to the source code of this file.
void set_palette |
( |
int |
pal = -1 | ) |
|
Definition at line 8 of file Utils.h.
11 gStyle->SetPalette(pal);
16 const int ncolors = 50;
17 static int colors[ncolors];
18 static bool initialized =
false;
20 double stops[npars] = { 0.00, 0.45, 0.49, 0.51, 0.55, 1.00 };
21 double reds[npars] = { 0.00, 0.00, 1.00, 1.00, 1.00, 1.00 };
22 double greens[npars] = { 0.00, 0.81, 1.00, 1.00, 0.20, 0.00 };
23 double blues[npars] = { 1.00, 1.00, 1.00, 1.00, 0.00, 0.00 };
25 int FI = TColor::CreateGradientColorTable(npars, stops, reds, greens, blues, ncolors);
26 for (
int ind=0; ind<ncolors; ++ind) {
27 colors[ind] = FI + ind;
32 gStyle->SetPalette(50,colors);