Gradient fill with transparency and "SAME" option.
Requires OS X and ROOT configured with –enable-cocoa.
void grad2()
{
::Error(
"grad2",
"can not allocate new custom colors");
return;
}
const Color_t customRed = freeIndices[0], grad1 = freeIndices[1];
const Color_t customGreen = freeIndices[2], grad2 = freeIndices[3];
TCanvas *
const cnv =
new TCanvas(
"gradiend demo 2",
"gradient demo 2", 100, 100, 800, 600);
::Error(
"grad2",
"This macro works only on OS X with --enable-cocoa");
delete cnv;
return;
}
new TColor(customRed, 1., 0., 0.,
"red", 0.5);
new TColor(customGreen, 0., 1., 0.,
"green", 0.5);
TH1F *
const hist =
new TH1F(
"a2",
"b2", 10, -2., 3.);
TH1F *
const hist2 =
new TH1F(
"c3",
"d3", 10, -3., 3.);
}
- Author
- Timur Pocheptsov
Definition in file grad2.C.