Hi all, I was just switching from an older version of ROOT (3.00/06) to the newest 3.03/09 and noticed that the color scale on COLZ plots is different: Less than the 50 colors of the gSystem->SetPalette(1) default are used. I found the reason for this change to be the introduction of contour levels. My histograms do not have contour levels set, so the default of 20 levels. I know you can change in the TH* itself, but this is very inconvenient for e.g. tree->Draw("...") or TBrowser draw selections as a new histogram is created each time. It would be nice to either have that default number configurable (e.g. gSystem->SetDefaultNumberContourLevels()) or to change with the number of colors in the color palette, i.e. change the lines in THistPainter.cxx void THistPainter::PaintColorLevels(Option_t *) from // Initialize the levels on the Z axis Int_t ncolors = gStyle->GetNumberOfColors(); Int_t ndiv = fH->GetContour(); if (ndiv == 0 ) { ndiv = 20; fH->SetContour(ndiv); } to // Initialize the levels on the Z axis Int_t ncolors = gStyle->GetNumberOfColors(); Int_t ndiv = fH->GetContour(); if (ndiv == 0 ) { ndiv = ncolors; if (ndiv <= 0 ) ndiv=20; fH->SetContour(ndiv); } Ciao Thomas ---------------------------------------------------------------------------- Thomas Hadig MS 62, 2575 Sand Hill Road, Menlo Park CA 94025, USA hadig@slac.stanford.edu Tel.: +1 650 926 2810 http://www.slac.stanford.edu/~hadig/ ---------------------------------------------------------------------------- In a world without walls and fences, who needs windows and gates ? ----------------------------------------------------------------------------
This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:21 MET