I am having trouble setting the color palette for a TH2D. I am only mildly familiar with making my own ColorGradientTable and I am having trouble creating one for the specifications I want. I want to create one that shows bin values less than 1 blue, shaded appropriately, and then values greater than 1 red, also shaded appropriately. I also would like to set the color of bins equal to 1 as white. I think I just don’t understand how to set the Length and RGB arrays appropriately to achieve this.
I.E. I am not sure how to set the following code to achieve this result:
const Int_t Number = 3;
Double_t Red[Number] = { 1.00, 0.00, 0.00};
Double_t Green[Number] = { 0.00, 1.00, 0.00};
Double_t Blue[Number] = { 1.00, 0.00, 1.00};
Double_t Length[Number] = { 0.00, 0.50, 1.00 };
Int_t nb=50;
TColor::CreateGradientColorTable(Number,Length,Red,Green,Blue,nb);
I want it to look like the following:
Any help would be appreciated!
Derek