Home | News | Documentation | Download

Maximum number of contours in SetContour()

I got a warning message when I use TH1::SetContour():

"Warning in <THistPainter::PaintContour>: maximum number of contours is 104, asked for 400". 

Is there anyway to increase the maximum number?


ROOT Version: 6.08.04
Platform: MacOS 10.12.6


No it cannot be changed. For the time being this is a fixed value.
But I am wondering if a plot with 400 contours will be readable ?
Do you have an example of plot ?

I guess the idea could be that one uses the “Draw” statement to create contours which are then “extracted” from the plot and used elsewhere (so the plot’s appearance doesn’t matter at all).

1 Like

Ah yes… that could be …

@Wile_E_Coyote Yea, as you said, the goal is to create a list of contours (with draw option “CONT Z LIST”) to be extracted. I am trying to get the closest contour to include 68%, 90%, 95% of the events. Obviously, the more contours allowed, the more accurate the finding.

The primary goal of this code is to produce graphics. The Maximum number of contours in now defined in THistPainter.cxx by the fixed parameter kMAXCONTOUR. If you have installed ROOT from the sources you can try to increase it. I do not have better work around for the time being.

HI,
if you do this kind of things I assume its better to control levels
of the contours anyway.
So you can do e.g. the game 4 times with 100 contours,
SetContour (Int_t nlevels, const Double_t *levels=0)

Otto