16 TPad *right_pad, *top_pad;
20 auto *
c1 =
new TCanvas(
"c1",
"c1",900,900);
23 TPad *center_pad =
new TPad(
"center_pad",
"center_pad",0.0,0.0,0.6,0.6);
26 right_pad =
new TPad(
"right_pad",
"right_pad",0.55,0.0,1.0,0.6);
29 top_pad =
new TPad(
"top_pad",
"top_pad",0.0,0.55,0.6,1.0);
32 h2 =
new TH2F(
"h2",
"",40,-4,4,40,-20,20);
34 for (
Int_t i = 0; i < 25000; i++) {
51 projh2Y->
Draw(
"hbar");
57 t->
DrawLatex(0.6,0.88,
"This example demonstrates how to display");
58 t->
DrawLatex(0.6,0.85,
"a histogram and its two projections.");
60 auto *
ex =
new TExec(
"zoom",
"ZoomExec()");
virtual void Rannor(Float_t &a, Float_t &b)
Return 2 numbers distributed following a gaussian with mean=0 and sigma=1.
Int_t GetFirst() const
Return first bin on the axis i.e.
virtual Double_t GetBinLowEdge(Int_t bin) const
Return low edge of bin.
TH1D * ProjectionY(const char *name="_py", Int_t firstxbin=0, Int_t lastxbin=-1, Option_t *option="") const
Project a 2-D histogram into a 1-D histogram along Y.
R__EXTERN TStyle * gStyle
TH1D * ProjectionX(const char *name="_px", Int_t firstybin=0, Int_t lastybin=-1, Option_t *option="") const
Project a 2-D histogram into a 1-D histogram along X.
virtual Double_t GetBinUpEdge(Int_t bin) const
Return up edge of bin.
virtual void SetRangeUser(Double_t ufirst, Double_t ulast)
Set the viewing range for the axis from ufirst to ulast (in user coordinates).
virtual void SetTextFont(Font_t tfont=62)
Set the text font.
TVirtualPad * cd(Int_t subpadnumber=0)
Set Current pad.
To draw Mathematical Formula.
TLatex * DrawLatex(Double_t x, Double_t y, const char *text)
Make a copy of this object with the new parameters And copy object attributes.
virtual void Draw(Option_t *option="")
Draw Pad in Current pad (re-parent pad if necessary).
Int_t GetLast() const
Return last bin on the axis i.e.
virtual void Draw(Option_t *option="")
Draw this histogram with options.
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
2-D histogram with a float per channel (see TH1 documentation)}
The most important graphics class in the ROOT system.
R__EXTERN TRandom * gRandom
1-D histogram with a double per channel (see TH1 documentation)}
virtual void Add(TObject *obj)
void SetOptStat(Int_t stat=1)
The type of information printed in the histogram statistics box can be selected via the parameter mod...
TExec is a utility class that can be used to execute a C++ command when some event happens in a pad...
virtual void SetTextSize(Float_t tsize=1)
Set the text size.
Int_t Fill(Double_t)
Invalid Fill method.
TList * GetListOfFunctions() const
THist< 2, float, THistStatContent, THistStatUncertainty > TH2F
void SetPalette(Int_t ncolors=kBird, Int_t *colors=0, Float_t alpha=1.)
See TColor::SetPalette.
void Modified(Bool_t flag=1)
TAxis * GetXaxis()
Get the behaviour adopted by the object about the statoverflows. See EStatOverflows for more informat...