29 auto c1 =
new TCanvas(
"c1",
"transparent pad demo", 10, 10, 900, 500);
30 if (!
c1->UseGL() && !
c1->IsWeb() && !
gVirtualX->InheritsFrom(
"TGCocoa"))
32 "To have real transparency in a canvas graphics, you need either OpenGL or Mac/Cocoa or Web rendering enabled");
35 auto h1 =
new TH1F(
"TH1F 1",
"TH1F 1", 100, -1.5, 1.5);
38 auto h2 =
new TH1F(
"TH1F 2",
"TH1F 2", 100, -1.5, 0.);
39 h2->FillRandom(
"gaus");
41 auto h3 =
new TH1F(
"TH1F 3",
"TH1F 3", 100, 0.5, 2.);
42 h3->FillRandom(
"landau");
45 auto pad1 =
new TPad(
"transparent pad 1",
"transparent pad 1", 0.1, 0.1, 0.7, 0.7);
47 pad1->SetFillStyle(4040);
51 auto pad2 =
new TPad(
"transparent pad 2",
"transparent pad 2", 0.2, 0.2, 0.8, 0.8);
53 pad2->SetFillStyle(4035);
57 auto pad3 =
new TPad(
"transparent pad 3",
"transparent pad 3", 0.3, 0.3, 0.9, 0.9);
59 pad3->SetFillStyle(4030);
68 stats2->SetFillStyle(4050);
74 stats3->SetFillStyle(4050);
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
void Warning(const char *location, const char *msgfmt,...)
Use this function in warning situations.
R__EXTERN TStyle * gStyle
1-D histogram with a float per channel (see TH1 documentation)
virtual void FillRandom(TF1 *f1, Int_t ntimes=5000, TRandom *rng=nullptr)
The most important graphics class in the ROOT system.
The histogram statistics painter class.
void SetFrameFillStyle(Style_t styl=0)
void SetCanvasPreferGL(Bool_t prefer=kTRUE)