21void transp_text(
bool gl =
true)
28 gStyle->SetCanvasPreferGL(gl);
30 auto c1 =
new TCanvas(
"transp_text",
"transparent text demo", 10, 10, 900, 500);
31 if (!
c1->UseGL() && !
c1->IsWeb())
32 ::Warning(
"transp_text",
"to use this macro you need either OpenGL or Web");
35 c1->SetBottomMargin(0.15);
38 const char *people[nx] = {
"Jean",
"Pierre",
"Marie",
"Odile",
"Sebastien",
"Fons",
"Rene",
39 "Nicolas",
"Xavier",
"Greg",
"Bjarne",
"Anton",
"Otto",
"Eddy",
40 "Peter",
"Pasha",
"Philippe",
"Suzanne",
"Jeff",
"Valery"};
42 auto h =
new TH1F(
"h4",
"test", nx, 0, nx);
45 for (
Int_t i = 0; i < 5000; ++i)
46 h->Fill(
gRandom->Gaus(0.5 * nx, 0.2 * nx));
49 for (
Int_t i = 1; i <= nx; ++i)
50 h->GetXaxis()->SetBinLabel(i, people[i - 1]);
54 auto pt =
new TPaveText(0.3, 0.3, 0.98, 0.98,
"brNDC");
56 pt->SetFillColor(grayColorIndex);
57 pt->SetTextColor(blackColorIndex);
int Int_t
Signed integer 4 bytes (int).
float Float_t
Float 4 bytes (float).
void Warning(const char *location, const char *msgfmt,...)
Use this function in warning situations.
static Int_t GetColor(const char *hexcolor)
1-D histogram with a float per channel (see TH1 documentation)