00001
00002
00003 void glh3c()
00004 {
00005 gStyle->SetCanvasPreferGL(kTRUE);
00006
00007
00008 TGLTH3Composition * comp = new TGLTH3Composition;
00009 TH3F * h1 = new TH3F("h1", "h1", 10, -1., 1., 10, -1., 1., 10, -1., 1.);
00010 h1->FillRandom("gaus");
00011 h1->SetFillColor(kRed);
00012 TH3F * h2 = new TH3F("h2", "h2", 10, -1., 1., 10, -1., 1., 10, -1., 1.);
00013 h2->FillRandom("landau");
00014 h2->SetFillColor(kGreen);
00015 TH3F * h3 = new TH3F("h3", "h3", 10, -1., 1., 10, -1., 1., 10, -1., 1.);
00016 h3->FillRandom("gaus");
00017 h3->SetFillColor(kBlue);
00018
00019 comp->AddTH3(h1);
00020 comp->AddTH3(h2, TGLTH3Composition::kSphere);
00021 comp->AddTH3(h3);
00022
00023 comp->Draw();
00024
00025 TPaveLabel *title = new TPaveLabel(0.04, 0.86, 0.96, 0.98,
00026 "TH3 composition.");
00027 title->SetFillColor(32);
00028 title->Draw();
00029 }