Example of macro illustrating how to superimpose two histograms with different scales in the "same" pad. 
 
  
void hist010_TH1_two_scales()
{
 
   
   TH1D *
h1 = 
new TH1D(
"h1", 
"my histogram", 100, -3, 3);
 
   for (int i = 0; i < 10000; i++)
 
   
   for (int i = 1; i <= 100; i++) {
   }
 
   
 
   
}
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
 
R__EXTERN TStyle * gStyle
 
virtual void SetLineColor(Color_t lcolor)
Set the line color.
 
void SetLabelColor(Int_t labelcolor)
 
1-D histogram with a double per channel (see TH1 documentation)
 
virtual Int_t Fill(Double_t x)
Increment bin with abscissa X by 1.
 
void Draw(Option_t *option="") override
Draw this histogram with options.
 
virtual Double_t GetBinContent(Int_t bin) const
Return content of bin number bin.
 
virtual void Draw(Option_t *option="")
Default Draw method for all objects.
 
Random number generator class based on M.
 
void SetOptStat(Int_t stat=1)
The type of information printed in the histogram statistics box can be selected via the parameter mod...
 
static uint64_t sum(uint64_t i)
 
- Date
 - November 2024 
 
- Author
 - Rene Brun 
 
Definition in file hist010_TH1_two_scales.C.