30 ::Error(
"grad",
"failed to create new custom colors");
35 TCanvas *
const cnv =
new TCanvas(
"gradient demo 1",
"gradient demo 1", 100, 100, 600, 600);
38 ::Error(
"grad",
"This macro works only on MacOS X with --enable-cocoa");
54 const Color_t &frameGradient = colorIndices[2];
57 new TColor(colorIndices[0], 0.25, 0.25, 0.25,
"special pad color1", 0.55);
58 new TColor(colorIndices[1], 1., 1., 1.,
"special pad color2", 0.05);
60 const Double_t locations[] = {0., 0.2, 0.8, 1.};
61 const Color_t gradientIndices[4] = {colorIndices[0], colorIndices[1], colorIndices[1], colorIndices[0]};
66 gradFill1->
SetStartEnd(Point(0., 0.), Point(1., 0.));
70 const Color_t &padGradient = colorIndices[3];
73 const Double_t locations[] = {0., 1.};
74 const Color_t gradientIndices[2] = {30, 38};
79 gradFill2->
SetStartEnd(Point(0., 0.), Point(0., 1.));
83 const Color_t &histGradient = colorIndices[4];
87 const Double_t locations[3] = {0., 0.5, 1.};
92 gradFill3->
SetStartEnd(Point(0., 0.), Point(0., 1.));
98 TH1F *
const hist =
new TH1F(
"a1",
"b1", 20, -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.
void SetFrameFillColor(Color_t color=1)
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.
void SetStartEnd(const Point &p1, const Point &p2)
Set end and start.
unsigned FindFreeCustomColorIndices(Color_t(&indices)[N])