2D histogram draw scale still inconsistent


ROOT Version (e.g. 6.12/02): 6.12/06
Platform, compiler (e.g. CentOS 7.3, gcc6.2): macOS 10.13.4, homebrew bottle


Please see thread: 2D histogram fit draws to wrong scale

This problem can be reproduced with the scripts & files from that thread. In fact it is clearly visible in every image posted there. (I would reply there but threads are locked now after 2 weeks. Is there a way to resurrect/unlock own threads?)

Steps: Plot TH2D w/ option “E”, then again with option “SURF0 SAME” (as in the last reply there). Notice that the surface does not line up with the data points.

It looks like this can be worked around by using TH2::SetMinimum and TH2::SetMaximum.

Is this intended behavior? I assumed additional plots drawn using “same” would always be drawn to the scale set by the original plot. Maybe this is a bad assumption.

You should be able to post a follow-up to the original thread now.

Yes it is a limitation. Both plots should have the same min and max. see:
https://root.cern/doc/master/classTHistPainter.html#HP060a

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.