I recently updated my old root (v5.26.00e) to the last one (v5.34.14). Since it, I have some troubles to draw TGraph2D. Here you can see what my TGraph2D looks like when draw with v5.26.00e :
As you can see the result isn’t exactly what I was expected. I can do some zoom (on color scale) and then have color scale similar to the one with v5.26.00e. Yet the blank area is still blank.
I looked a bit in the root sources, and find that issue seems to be related to interpolation for TGraph2D (in TGraphDelaunay) : with the use of two scaling factor (one for X and another for Y) in v5.34.14 (since a while) whereas there was only one scaling factor in v5.26.00e.
I did some “naive” tests :
modification of TGraphDelaunay.cxx to use only one scaling factor :
if I use the same than in v5.26.00e : 2./((xmax-xmin)+(ymax-ymin)). I avoid the issue.
if I use the Y scaling factor of v5.34.14 : 1./(ymax-ymin). I avoid the issue too.
if I use the X scaling factor of v5.34.14 : 1./(xmax-xmin). I don’t avoid the issue.
if I modify the limits of my TGraph2D to a lesser value. I avoid also the issue with it. Yet, I have some reasons to want to keep the limits of the TGraph2D at 3000 and so I would like to not use this solution.
Is this issue expected ? Is there any (other) solution to fix it ?
You can find here a quick code that I did to fill the TGraph2D with random values (it’s maybe not as small as you were asking however, sorry). There is the same issue. RandomTGraph2D.C (3 KB)
I think you need to compile it (.x RandomTGraph2D.C++).
root [0] .x RandomTGraph2D.C++
Info in <TUnixSystem::ACLiC>: creating shared library /WORK/test-root-version-issue/./RandomTGraph2D_C.so
root [1] TFile *_file0 = TFile::Open("RanTGraph2D.root")
root [2] tgraph2d->Draw("colz")
Info in <TCanvas::MakeDefCanvas>: created default TCanvas with name c1