test() { TH2F *hh=new TH2F("hh","",100,-5,5,100,-5,5); for(int i=0;i<100000;i++){ hh->Fill(gRandom->Gaus(),gRandom->Gaus()); } hh->Draw("cont LIST"); int nctr; getContours(hh,nctr); } TGraph ** getContours(TH2F *hh, int &nctr) { TObjArray *contours = gROOT->GetListOfSpecials()->FindObject("contours"); if(!contours){ cout<<"null contours!"<GetSize(); TGraph** grs=new TGraph*[nctr]; for(int ictr=0; ictr < nctr; ictr++){ TList *list = (TList*)contours->At(ictr); grs[ictr]=(TGraph*)list->First(); } return grs; }