24 ::Error(
"grad2",
"can not allocate new custom colors");
29 const Color_t customRed = freeIndices[0], grad1 = freeIndices[1];
30 const Color_t customGreen = freeIndices[2],
grad2 = freeIndices[3];
33 TCanvas *
const cnv =
new TCanvas(
"gradiend demo 2",
"gradient demo 2", 100, 100, 800, 600);
36 ::Error(
"grad2",
"This macro works only on OS X with --enable-cocoa");
43 new TColor(customRed, 1., 0., 0.,
"red", 0.5);
54 const Double_t locations[] = {0., 1.};
60 gradFill1->
SetStartEnd(Point(0., 0.), Point(0., 1.));
63 new TColor(customGreen, 0., 1., 0.,
"green", 0.5);
70 gradFill2->
SetStartEnd(Point(0., 0), Point(0., 1.));
72 TH1F *
const hist =
new TH1F(
"a2",
"b2", 10, -2., 3.);
73 TH1F *
const hist2 =
new TH1F(
"c3",
"d3", 10, -3., 3.);
unsigned FindFreeCustomColorIndices(Color_t(&indices)[N])
1-D histogram with a float per channel (see TH1 documentation)}
void Error(const char *location, const char *msgfmt,...)
virtual void FillRandom(const char *fname, Int_t ntimes=5000)
Fill histogram following distribution in function fname.
virtual void Draw(Option_t *option="")
Draw this histogram with options.
virtual void SetFillColor(Color_t fcolor)
Define a linear color gradient.
The color creation and management class.
void SetStartEnd(const Point &p1, const Point &p2)
Set end and start.