This demo shows how to use transparency.
void transp(bool gl = true)
{
auto cnv =
new TCanvas(
"trasnparency",
"transparency demo", 600, 400);
auto hist =
new TH1F(
"a5",
"b5", 10, -2., 3.);
auto hist2 =
new TH1F(
"c6",
"d6", 10, -3., 3.);
hist->FillRandom("landau", 100000);
hist2->FillRandom("gaus", 100000);
hist->SetFillColor(redIndex);
hist2->SetFillColor(greeIndex);
cnv->cd();
hist2->Draw();
hist->Draw("SAME");
}
R__EXTERN TStyle * gStyle
static Int_t GetColor(const char *hexcolor)
Static method returning color number for color specified by hex color string of form: "#rrggbb",...
1-D histogram with a float per channel (see TH1 documentation)
void SetCanvasPreferGL(Bool_t prefer=kTRUE)
- Authors
- Timur Pocheptsov, Sergey Linev
Definition in file transp.C.