Hello, I do not succeed specifying my own levels of contour for 2D histograms. In a ROOT script (I load a program .c then I call a function), I do: TH2F* contour=new TH2F("contour","contour",nbinsX,xbins,nbinsY,ybins); //...filling "contour" Double_t levels[17]; levels[0]=1.864 levels[1]=5. //...filling "levels" non-equidistant contour->SetContour(17,levels); // <<----- ###### // NB: definition of this function in TH1 class contour->Draw("cont1"); My plot has 17 levels, OK, but they are equidistant ! When I want be sure that ROOT has understood "levels", I do (in my function too): Double_t levels2[50]; int ncontours=contour->GetContour(levels2); for(int i=0;i<ncontours;++i) cout<<levels2[i]<<endl; and I have exactly the same values that "levels", so it seems OK. The funny thing is that, after having done all that in the function, I redo in interactive the check with "levels2", and I have not the values of "levels", but the values of 17 equidistant levels (so as it is drawn)! So what happens ?? Have anybody an idea? (I hope that I gave a not too dark explanation) Thank you. Matthieu Lechowski. PS: I'm using ROOT on lxplus at cern, with environment: export ROOTSYS=/afs/cern.ch/sw/root/v3.04.02/rh72_gcc2953/root; export PATH=$ROOTSYS/bin:$PATH; export LD_LIBRARY_PATH=$ROOTSYS/lib:$LD_LIBRARY_PATH
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:12 MET