 
  
 
   Display the various 2-d drawing options.
 Display the various 2-d drawing options. 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
  
{
   TF2 *f2 = 
new TF2(
"f2", 
"xygaus + xygaus(5) + xylandau(10)", -4, 4, -4, 4);
 
   Double_t params[] = {130, -1.4, 1.8, 1.5, 1, 150, 2, 0.5, -2, 0.5, 3600, -2, 0.7, -3, 0.3};
 
   auto h2 = 
new TH2F(
"h2", 
"xygaus + xygaus(5) + xylandau(10)", 20, -4, 4, 20, -4, 4);
 
   h2->SetFillColor(46);
   h2->FillRandom("f2", 40000);
 
   
   auto c2h = 
new TCanvas(
"c2h", 
"2-d options", 10, 10, 800, 600);
 
   h2->Draw();
   h2->Draw("box");
   h2->Draw("arr");
   h2->Draw("colz");
 
   
   auto ctext = 
new TCanvas(
"ctext", 
"text option", 50, 50, 800, 600);
 
   h2->Draw("text");
 
   
   auto cont = 
new TCanvas(
"contours", 
"contours", 100, 100, 800, 600);
 
   h2->Draw("contz");
   h2->Draw("cont1");
   h2->Draw("cont2");
   h2->Draw("cont3");
 
   
   auto lego = 
new TCanvas(
"lego", 
"lego options", 150, 150, 800, 600);
 
   h2->Draw("lego");
   h2->Draw("lego1");
   h2->Draw("surf1pol");
   h2->Draw("surf1cyl");
 
   
   auto surf = 
new TCanvas(
"surfopt", 
"surface options", 200, 200, 800, 600);
 
   h2->Draw("surf1");
   h2->Draw("surf2z");
   h2->Draw("surf3");
   h2->Draw("surf4");
}
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 SetParameters(const Double_t *params)
A 2-Dim function with parameters.
2-D histogram with a float per channel (see TH1 documentation)
A Pave (see TPave) with a text centered in the Pave.
void SetOptStat(Int_t stat=1)
The type of information printed in the histogram statistics box can be selected via the parameter mod...
void SetFrameFillColor(Color_t color=1)
void SetCanvasColor(Color_t color=19)
- Date
- June 2022 
- Author
- Rene Brun 
Definition in file hist020_TH2_draw.C.