32 ::Error(
"grad2",
"can not allocate new custom colors");
37 const Color_t customRed = freeIndices[0], grad1 = freeIndices[1];
38 const Color_t customGreen = freeIndices[2], grad2 = freeIndices[3];
44 TCanvas *
const cnv =
new TCanvas(
"gradiend demo 2",
"gradient demo 2", 100, 100, 800, 600);
46 ::Error(
"grad2",
"This macro requires OpenGL");
53 new TColor(customRed, 1., 0., 0.,
"red", 0.5);
66 const Double_t locations[] = {0., 1.};
72 gradFill1->
SetStartEnd(Point(0., 0.), Point(0., 1.));
75 new TColor(customGreen, 0., 1., 0.,
"green", 0.5);
82 gradFill2->
SetStartEnd(Point(0., 0.), Point(0., 1.));
84 TH1F *
const hist =
new TH1F(
"a2",
"b2", 10, -2., 3.);
85 TH1F *
const hist2 =
new TH1F(
"c3",
"d3", 10, -3., 3.);
unsigned FindFreeCustomColorIndices(T(&indices)[N])
R__EXTERN TStyle * gStyle
THist< 1, float, THistStatContent, THistStatUncertainty > TH1F
tomato 1-D histogram with a float per channel (see TH1 documentation)}
void Error(const char *location, const char *msgfmt,...)
void SetCanvasPreferGL(Bool_t prefer=kTRUE)
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)
Set the fill area color.
Define a linear color gradient.
The color creation and management class.
void SetStartEnd(const Point &p1, const Point &p2)
Set end and start.