void hist015_TH1_read_and_draw()
{
TCanvas *
c1 =
new TCanvas(
"c1",
"Histogram Drawing Options", 200, 10, 700, 900);
TPad *pad1 =
new TPad(
"pad1",
"The pad with the function", 0.03, 0.62, 0.50, 0.92);
TPad *pad2 =
new TPad(
"pad2",
"The pad with the histogram", 0.51, 0.62, 0.98, 0.92);
TPad *pad3 =
new TPad(
"pad3",
"The pad with the histogram", 0.03, 0.02, 0.97, 0.57);
TPaveLabel *title =
new TPaveLabel(0.1, 0.94, 0.9, 0.98,
"Drawing options for one dimensional histograms");
title->SetTextFont(52);
title->Draw();
pave->
AddText(
"Title and Stats pads");
pave->
AddText(
"You can modify bin contents");
}
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
virtual void SetMarkerStyle(Style_t mstyle=1)
Set the marker style.
void GetObject(const char *namecycle, T *&ptr)
Get an object with proper type checking.
void ls(Option_t *option="") const override
List Directory contents.
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=ROOT::RCompressionSetting::EDefaults::kUseCompiledDefault, Int_t netopt=0)
TH1 is the base class of all histogram classes in ROOT.
virtual TH1 * DrawCopy(Option_t *option="", const char *name_postfix="_copy") const
void Draw(Option_t *option="") override
Default Draw method for all objects.
The most important graphics class in the ROOT system.
void SetGridx(Int_t value=1) override
void SetGridy(Int_t value=1) override
TVirtualPad * cd(Int_t subpadnumber=0) override
Set Current pad.
TFrame * GetFrame() override
void Draw(Option_t *option="") override
Draw Pad in Current pad (re-parent pad if necessary).
A Pave (see TPave) with a text centered in the Pave.
void Draw(Option_t *option="") override
Draw this pavelabel with its current attributes.
void Draw(Option_t *option="") override
Draw this pave with its current attributes.
virtual TText * AddText(Double_t x1, Double_t y1, const char *label)