|   | ROOT   6.12/07 Reference Guide | 
| Functions | |
| leg | AddEntry (h1,"Histogram filled with random numbers","f") | 
| leg | AddEntry ("f1","Function abs(#frac{sin(x)}{x})","l") | 
| leg | AddEntry ("gr","Graph with error bars","lep") | 
| h1 | Draw () | 
| f1 | Draw ("same") | 
| gr | Draw ("P") | 
| h1 | FillRandom ("gaus", 30000) | 
| for (Int_t i=0;i< n;i++) | |
| h1 | SetFillColor (kGreen) | 
| h1 | SetFillStyle (3003) | 
| leg | SetHeader ("The Legend Title") | 
| f1 | SetLineColor (kBlue) | 
| gr | SetLineColor (kRed) | 
| f1 | SetLineWidth (4) | 
| gr | SetLineWidth (2) | 
| gr | SetMarkerColor (7) | 
| gr | SetMarkerSize (1.3) | 
| gr | SetMarkerStyle (21) | 
| gr | SetName ("gr") | 
| gStyle | SetOptStat (0) | 
| Variables | |
| return | c1 | 
| Double_t | ex [n] | 
| Double_t | ey [n] | 
| TF1 * | f1 =new TF1("f1","1000*TMath::Abs(sin(x)/x)",-10,10) | 
| TGraphErrors * | gr = new TGraphErrors(n,x,y,ex,ey) | 
| TH1F * | h1 = new TH1F("h1","TLegend Example",200,-10,10) | 
| leg = new TLegend(0.1,0.7,0.48,0.9) | |
| const Int_t | n = 20 | 
| Double_t | x [n] | 
| Double_t | y [n] | 
| h1 Draw | ( | ) | 
| f1 Draw | ( | "same" | ) | 
| gr Draw | ( | "P" | ) | 
| h1 FillRandom | ( | "gaus" | , | 
| 30000 | |||
| ) | 
| h1 SetFillStyle | ( | 3003 | ) | 
| leg SetHeader | ( | "The Legend Title" | ) | 
| f1 SetLineWidth | ( | 4 | ) | 
| gr SetLineWidth | ( | 2 | ) | 
| gr SetMarkerColor | ( | 7 | ) | 
| gr SetMarkerSize | ( | 1. | 3 | ) | 
| gr SetMarkerStyle | ( | 21 | ) | 
| gr SetName | ( | "gr" | ) | 
| gStyle SetOptStat | ( | 0 | ) | 
| TGraphErrors* gr = new TGraphErrors(n,x,y,ex,ey) |