Example of a canvas showing two histograms with different scales.
The second histogram is drawn in a transparent pad
{
pad2->SetFillStyle(4000);
TH1F *h2 =
new TH1F(
"h2",
"h2",100,-3,3);
for (
Int_t i=0;i<100000;i++) {
}
ps1->SetX1NDC(0.4);
ps1->SetX2NDC(0.6);
h2->Draw("][sames");
ps2->SetX1NDC(0.65);
ps2->SetX2NDC(0.85);
}
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
Option_t Option_t TPoint TPoint const char x2
Option_t Option_t TPoint TPoint const char x1
void SetLabelColor(Int_t labelcolor)
1-D histogram with a float 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.
TList * GetListOfFunctions() const
TObject * FindObject(const char *name) const override
Find an object in this list using its name.
virtual void Draw(Option_t *option="")
Default Draw method for all objects.
The most important graphics class in the ROOT system.
The histogram statistics painter class.
This is the base class for the ROOT Random number generators.
- Author
- Rene Brun
Definition in file transpad.C.