{ #ifndef MK_ROOTLOGON #define MK_ROOTLOGON Int_t R2BPalette[100]; Int_t B2RPalette[100]; Int_t DS9Palette[100]; Int_t PaoloPalette[100]; Int_t JorgePalette[100]; Int_t DurantiPalette[100]; Int_t YBPalette[100]; Int_t BYPalette[100]; cout << "Start Palette Definitions" << endl; // blue - red (rainbow) w/o green // red - blue (rainbow) w/o green cout << "define palette r2b ... to use it gStyle->SetPalette(100, R2BPalette)" << endl; cout << "define palette b2r ... to use it gStyle->SetPalette(100, B2RPalette)" << endl; Double_t s0[] = { 0.00, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0 }; Double_t r0[] = {165./255.,215./255.,244./255.,253./255.,254./255.,255./255.,224./255.,171./255.,116./255.,69./255.,49/255. }; Double_t g0[] = {0./255.,48./255.,109./255.,174./255.,224./255.,255./255.,243./255.,217./255.,173./255.,117./255.,54/255. }; Double_t b0[] = {38./255.,39./255.,67./255.,97./255.,144./255.,191./255.,248./255.,233./255.,209./255.,180./255.,149/255. }; Int_t FI0 = TColor::CreateGradientColorTable(11, s0, r0, g0, b0, 100); for (int i=0;i<100;i++) R2BPalette[i] = FI0+i; for (int i=0;i<100;i++) B2RPalette[100-i-1] = FI0+i; // black > blue > red > yellow > white as in ds9 cout << "define palette black > blue > red > yellow > white ... to use it gStyle->SetPalette(100,DS9Palette)" << endl; Double_t r1[] = {0., 0.0, 1.0, 1.0, 1.0}; Double_t g1[] = {0., 0.0, 0.0, 1.0, 1.0}; Double_t b1[] = {0., 1.0, 0.0, 0.0, 1.0}; Double_t s1[] = {0., .25, .50, .75, 1.0}; Int_t FI1 = TColor::CreateGradientColorTable(5, s1, r1, g1, b1, 100); for (int i=0;i<100;i++) DS9Palette[i] = FI1+i; // orange > yellow > purple > blue > white cout << "define palette orange > yellow > purple > blue > white ... to use it gStyle->SetPalette(100,PaoloPalette)" << endl; Double_t r2[] = {1.00, 1.00, 1.00, 0.00, 1.00}; Double_t g2[] = {0.30, 1.00, 0.00, 0.00, 1.00}; Double_t b2[] = {0.10, 0.00, 1.00, 1.00, 1.00}; Double_t s2[] = {0.00, 0.25, 0.50, 0.75, 1.00}; Int_t FI2 = TColor::CreateGradientColorTable(5, s2, r2, g2, b2, 100); for (int i=0;i<100;i++) PaoloPalette[i] = FI2+i; // Jorge cout << "define palette Jorge ... to use it gStyle->SetPalette(100,JorgePalette)" << endl; Double_t s3[] = { 0.00, 0.00, 0.05, 0.10, 0.50, 1.00 }; Double_t r3[] = { 1.00, 1.00, 1.00, 1.00, 0.00, 0.00 }; Double_t g3[] = { 0.80, 0.80, 0.10, 1.00, 0.80, 0.00 }; Double_t b3[] = { 0.50, 0.50, 0.10, 0.00, 1.00, 0.50 }; //Double_t s3[] = { 0.00, 0.00, 0.05, 0.10, 0.50, 1.00 }; Int_t FI3 = TColor::CreateGradientColorTable(6, s3, r3, g3, b3, 100); for (int i=0;i<100;i++) JorgePalette[i] = FI3+i; // Duranti cout << "define palette Duranti ... to use it gStyle->SetPalette(100,DurantiPalette)" << endl; Double_t r4[7] = {0.0, 0.0, 0.0, 0.1, 1.0, 1.0, 0.7}; Double_t g4[7] = {0.0, 0.2, 0.7, 0.9, 0.7, 0.2, 0.0}; Double_t b4[7] = {0.7, 1.0, 1.0, 0.1, 0.0, 0.0, 0.0}; Double_t s4[7] = {0.0, 0.1, 0.3, 0.5, 0.7, 0.9, 1.0}; Int_t FI4 = TColor::CreateGradientColorTable(7, s4, r4, g4, b4, 100); for (int i=0;i<100;i++) DurantiPalette[i] = FI4+i; // Yellow - blue (margins: light-yellow and black) cout << "define palette yellow > blue ... to use it gStyle->SetPalette(100,YBPalette)" << endl; Double_t r5[7] = {0.95, 0.90, 0.90, 0.90, 0.00, 0.10}; Double_t g5[7] = {0.95, 0.90, 0.00, 0.00, 0.00, 0.10}; Double_t b5[7] = {0.95, 0.00, 0.00, 0.90, 0.90, 0.10}; Double_t s5[7] = {0.00, 0.05, 0.40, 0.50, 0.95, 1.00}; Int_t FI5 = TColor::CreateGradientColorTable(6, s5, r5, g5, b5, 100); for (int i=0;i<100;i++) YBPalette[i] = FI5+i; // Blue - Yellow cout << "define palette blue > yellow ... to use it gStyle->SetPalette(100,BYPalette)" << endl; Double_t r6[7] = {0.95, 0.00, 0.90, 0.90, 0.90, 0.95}; Double_t g6[7] = {0.95, 0.00, 0.00, 0.00, 0.90, 0.95}; Double_t b6[7] = {0.95, 0.90, 0.90, 0.00, 0.00, 0.95}; Double_t s6[7] = {0.00, 0.05, 0.40, 0.50, 0.95, 1.00}; Int_t FI6 = TColor::CreateGradientColorTable(6, s6, r6, g6, b6, 100); for (int i=0;i<100;i++) BYPalette[i] = FI6+i; gStyle->SetPalette(100,B2RPalette); gStyle->SetNumberContours(99); // Availible in root 5.34.XX cout << "The following are available after root 5.34.XX" << endl; cout << "define palette Dark Body Radiator to use it gStyle->SetPalette(53,0)" << endl; cout << "define palette inverted Dark Body Radiator to use it gStyle->SetPalette(56,0)" << endl; cout << "Finished Defining the Palettes" << endl; //Defining a more reasonable style. TStyle* my_style_1 = new TStyle("my_style_1_name","My Style 1"); my_style_1->SetOptStat("ie"); my_style_1->SetStatColor(kWhite); my_style_1->SetCanvasColor(kWhite); my_style_1->SetTitleFillColor(kWhite); my_style_1->SetPadGridX(true); my_style_1->SetPadGridY(true); my_style_1->SetNdivisions(20510,"x"); my_style_1->SetNdivisions(40510,"y"); my_style_1->SetLabelSize(0.045,"xyz"); my_style_1->SetLabelFont(62,"xyz"); my_style_1->SetTitleFont(62,"xyz"); my_style_1->SetTitleSize(0.05,"xyz"); my_style_1->SetTitleOffset(0.9,"y"); my_style_1->SetPadBottomMargin(0.12); my_style_1->SetPadRightMargin(0.2); my_style_1->SetPadTopMargin(0.12); my_style_1->SetTitleBorderSize(0); //int colors[50]; //for(int i=0;i<50;i++) //{ // colors[i] = 51+i; //} //my_style_1->SetPalette(50,colors); my_style_1->SetPalette(100, DS9Palette); my_style_1->SetNumberContours(99); my_style_1->cd(); //gROOT->ForceStyle(); #endif }