31 ::Error(
"transp_text",
"failed to create new custom colors");
36 const Color_t grayColorIndex = indices[0], blackColorIndex = indices[1];
37 new TColor(grayColorIndex, 0.8, 0.8, 0.8,
"transparent_gray", 0.85);
38 new TColor(blackColorIndex, 0., 0., 0.,
"transparent_black", 0.5);
41 TCanvas *
const c1 =
new TCanvas(
"transparent text",
"transparent text demo", 10, 10, 900, 500);
45 "You can see the transparency ONLY in a pdf or png output (\"File\"->\"Save As\" ->...)\n"
46 "To have transparency in a canvas graphics, you need OS X version with cocoa enabled");
50 c1->SetBottomMargin(0.15);
53 const char *people[nx] = {
"Jean",
"Pierre",
"Marie",
"Odile",
"Sebastien",
"Fons",
"Rene",
54 "Nicolas",
"Xavier",
"Greg",
"Bjarne",
"Anton",
"Otto",
"Eddy",
55 "Peter",
"Pasha",
"Philippe",
"Suzanne",
"Jeff",
"Valery"};
57 TH1F *
const h =
new TH1F(
"h4",
"test", nx, 0, nx);
60 for (
Int_t i = 0; i < 5000; ++i)
61 h->Fill(
gRandom->Gaus(0.5 * nx, 0.2 * nx));
64 for (
Int_t i = 1; i <= nx; ++i)
65 h->GetXaxis()->SetBinLabel(i, people[i - 1]);
71 pt->SetFillColor(grayColorIndex);
72 pt->SetTextColor(blackColorIndex);
int Int_t
Signed integer 4 bytes (int).
short Color_t
Color number (short).
Error("WriteTObject","The current directory (%s) is not associated with a file. The object (%s) has not been written.", GetName(), objname)
void Warning(const char *location, const char *msgfmt,...)
Use this function in warning situations.
1-D histogram with a float per channel (see TH1 documentation)
unsigned FindFreeCustomColorIndices(Color_t(&indices)[N])