26 ::Error(
"transp_text",
"failed to create new custom colors");
31 const Color_t grayColorIndex = indices[0], blackColorIndex = indices[1];
32 new TColor(grayColorIndex, 0.8, 0.8, 0.8,
"transparent_gray", 0.85);
33 new TColor(blackColorIndex, 0., 0., 0.,
"transparent_black", 0.5);
36 TCanvas *
const c1 =
new TCanvas(
"transparent text",
"transparent text demo", 10, 10, 900, 500);
39 ::Warning(
"transt_text",
"You can see the transparency ONLY in a pdf or png output (\"File\"->\"Save As\" ->...)\n"
40 "To have transparency in a canvas graphics, you need OS X version with cocoa enabled");
47 const char *people[
nx] = {
"Jean",
"Pierre",
"Marie",
"Odile",
48 "Sebastien",
"Fons",
"Rene",
"Nicolas",
"Xavier",
"Greg",
49 "Bjarne",
"Anton",
"Otto",
"Eddy",
"Peter",
"Pasha",
50 "Philippe",
"Suzanne",
"Jeff",
"Valery"};
52 TH1F *
const h =
new TH1F(
"h4",
"test", nx, 0, nx);
55 for (
Int_t i = 0; i < 5000; ++i)
virtual Int_t Fill(Double_t x)
Increment bin with abscissa X by 1.
virtual void Draw(Option_t *option="")
Draw this pavetext with its current attributes.
unsigned FindFreeCustomColorIndices(Color_t(&indices)[N])
virtual Double_t Gaus(Double_t mean=0, Double_t sigma=1)
Samples a random number from the standard Normal (Gaussian) Distribution with the given mean and sigm...
virtual TText * AddText(Double_t x1, Double_t y1, const char *label)
Add a new Text line to this pavetext at given coordinates.
1-D histogram with a float per channel (see TH1 documentation)}
virtual void SetGrid(Int_t valuex=1, Int_t valuey=1)
void Error(const char *location, const char *msgfmt,...)
virtual void SetTextAlign(Short_t align=11)
virtual void SetBottomMargin(Float_t bottommargin)
Set Pad bottom margin in fraction of the pad height.
virtual void Draw(Option_t *option="")
Draw this histogram with options.
virtual void SetFillColor(Color_t fcolor)
void Warning(const char *location, const char *msgfmt,...)
R__EXTERN TRandom * gRandom
A Pave (see TPave) with text, lines or/and boxes inside.
The color creation and management class.
virtual void SetBinLabel(Int_t bin, const char *label)
Set label for bin.
virtual void SetTextColor(Color_t tcolor=1)
virtual void SetTextSize(Float_t tsize=1)
virtual void SetStats(Bool_t stats=kTRUE)
Set statistics option on/off.