23 ::Error(
"transparentpad",
"failed to create new custom colors");
28 TCanvas *
const c1 =
new TCanvas(
"transparent pad",
"transparent pad demo", 10, 10, 900, 500);
31 ::Warning(
"transparentpad",
"You can see the transparency ONLY in a pdf or png output (\"File\"->\"Save As\" ->...)\n"
32 "To have transparency in a canvas graphics, you need OS X version with cocoa enabled");
36 new TColor(indices[0], 1., 0.2, 0.2,
"transparent_pink", 0.25);
37 new TColor(indices[1], 0.2, 1., 0.2,
"transparent_green", 0.25);
38 new TColor(indices[2], 0.2, 2., 1.,
"transparent_blue", 0.15);
41 TH1F *
const h1 =
new TH1F(
"TH1F 1",
"TH1F 1", 100, -1.5, 1.5);
44 TH1F *
const h2 =
new TH1F(
"TH1F 2",
"TH1F 2", 100, -1.5, 0.);
47 TH1F *
const h3 =
new TH1F(
"TH1F 3",
"TH1F 3", 100, 0.5, 2.);
51 TPad *
const pad1 =
new TPad(
"transparent pad 1",
"transparent pad 1", 0.1, 0.1, 0.7, 0.7);
58 TPad *
const pad2 =
new TPad(
"transparent pad 2",
"transparent pad 2", 0.2, 0.2, 0.8, 0.8);
65 TPad *
const pad3 =
new TPad(
"transparent pad 3",
"transparent pad 3", 0.3, 0.3, 0.9, 0.9);
unsigned FindFreeCustomColorIndices(Color_t(&indices)[N])
TVirtualPad * cd(Int_t subpadnumber=0)
Set current canvas & pad.
1-D histogram with a float per channel (see TH1 documentation)}
TVirtualPad * cd(Int_t subpadnumber=0)
Set Current pad.
virtual void Draw(Option_t *option="")
Draw Pad in Current pad (re-parent pad if necessary).
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)
The most important graphics class in the ROOT system.
void Warning(const char *location, const char *msgfmt,...)
The color creation and management class.