{ TH1F *hgaus1 = new TH1F("Hgaus1", "", 100, -10, 10); TH1F *hgaus2 = new TH1F("Hgaus2", "", 100, -20, 20); THStack *hst = new THStack(); hgaus1->FillRandom("gaus", 30000); hst->Add(hgaus1, "ep"); hgaus2->FillRandom("gaus", 30000); hst->Add(hgaus2, "ep"); hst->Draw("nostack"); hst->GetHistogram()->SetLabelSize(0.07, "xy"); }
Int_t x[5] = {0,1,2,3,4}; Int_t y[5] = {10,1,2,3,0}; Int_t n = 5; TGraph *gr = new TGraph(n,x,y); gr->Draw("AB*");This problem was submited here: https://savannah.cern.ch/bugs/index.php?53949
{ TH1F *hgaus1 = new TH1F("Hgaus1", "", 100, -10, 10); TH1F *hgaus2 = new TH1F("Hgaus2", "", 100, -20, 20); THStack *hst = new THStack(); hgaus1->FillRandom("gaus", 30000); hst->Add(hgaus1, "ep"); hgaus2->FillRandom("gaus", 30000); hst->Add(hgaus2, "ep"); hst->Draw("nostack"); hst->GetHistogram()->SetLabelSize(0.07, "xy"); }