29      ::Error(
"grad2", 
"can not allocate new custom colors");
 
   34   const Color_t customRed = freeIndices[0], grad1 = freeIndices[1];
 
   35   const Color_t customGreen = freeIndices[2], grad2 = freeIndices[3];
 
   38   TCanvas * 
const cnv = 
new TCanvas(
"gradient demo 2", 
"gradient demo 2", 100, 100, 800, 600);
 
   41      ::Error(
"grad2", 
"This macro works only on OS X with --enable-cocoa");
 
   48   new TColor(customRed, 1., 0., 0., 
"red", 0.5);
 
   59   const Double_t locations[] = {0., 1.};
 
   65   gradFill1->
SetStartEnd(Point(0., 0.), Point(0., 1.));
 
   68   new TColor(customGreen, 0., 1., 0., 
"green", 0.5);
 
   75   gradFill2->
SetStartEnd(Point(0., 0), Point(0., 1.));
 
   77   TH1F * 
const hist = 
new TH1F(
"a2", 
"b2", 10, -2., 3.);
 
   78   TH1F * 
const hist2 = 
new TH1F(
"c3", 
"d3", 10, -3., 3.);
 
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
 
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
 
The color creation and management class.
 
1-D histogram with a float per channel (see TH1 documentation)}
 
virtual void FillRandom(const char *fname, Int_t ntimes=5000, TRandom *rng=nullptr)
Fill histogram following distribution in function fname.
 
void Draw(Option_t *option="") override
Draw this histogram with options.
 
Define a linear color gradient.
 
void SetStartEnd(const Point &p1, const Point &p2)
Set end and start.
 
unsigned FindFreeCustomColorIndices(Color_t(&indices)[N])