This tutorial demonstrates how to use the highlight mode on graph.
{
if (!Pad) return;
if (ihp == -1) {
return;
}
Pad->cd();
}
}
void hlGraph1()
{
auto Canvas =
new TCanvas(
"Canvas",
"Canvas", 0, 0, 700, 500);
Canvas->HighlightConnect("HighlightHisto(TVirtualPad*,TObject*,Int_t,Int_t)");
for (
Int_t i = 0; i <
n; i++) {
h->FillRandom(
"gaus", 1000);
y[i] =
h->GetFunction(
"gaus")->GetParameter(2);
}
auto Pad =
new TPad(
"Pad",
"Pad", 0.3, 0.4, 1.0, 1.0);
Pad->SetFillColor(
kBlue-10);
Pad->Draw();
Pad->cd();
auto info =
new TText(0.5, 0.5,
"please move the mouse over the graPad");
info->SetTextAlign(22);
info->Draw();
Canvas->cd();
}
A TGraph is an object made of two arrays X and Y with npoints each.
1-D histogram with a float per channel (see TH1 documentation)
Mother of all ROOT objects.
virtual void Clear(Option_t *="")
virtual TObject * FindObject(const char *name) const
Must be redefined in derived classes.
virtual void Draw(Option_t *option="")
Default Draw method for all objects.
The most important graphics class in the ROOT system.
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
Base class for several text objects.
TVirtualPad is an abstract base class for the Pad and Canvas classes.
- Date
- March 2018
- Author
- Jan Musinsky
Definition in file hlGraph1.C.