TGraph2DErrors is displaying the wrong error bars

Hi,

I recently had a discussion about the TGraph2DErrors function. It seems like TGraph2DErrors is not behaving correctly in pyROOT. Do others agree with me?

The error bars shown are those of the interpolated surface rather than those given to the function. This is not what I would like to have. I want my specified data points with error bars. I am using this script:

[code]import numpy, ROOT
import numpy.random
try:
c = ROOT.TCanvas(“c”,“Graph2DErrors example”,0,0,600,600)
P = 6.
np = 10
rx = numpy.zeros(np,‘Float64’)
ry = numpy.zeros(np,‘Float64’)
rz = numpy.zeros(np,‘Float64’)
ex = numpy.zeros(np,‘Float64’)
ey = numpy.zeros(np,‘Float64’)
ez = numpy.zeros(np,‘Float64’)
for i in range(np):
rx[i] = numpy.random.uniform()
ry[i] = numpy.random.uniform()
rz[i] = rx[i]*rx[i]-ry[i]*ry[i]
ex[i] = 0
ey[i] = 0
ez[i] = 100

ROOT.gStyle.SetPalette(1)

dte = ROOT.TGraph2DErrors(np, rx, ry, rz, ex, ey, ez)

dte.SetFillColor(29)
dte.SetMarkerSize(0.5)
dte.SetMarkerStyle(4)
except:
print ‘Doh!’

dte.Draw(‘E’)[/code]

Can this be easily fixed? Or am I the only one experiencing these errors?

Kind Regards,
Erik

Erik,

given Rene’s answer in the other thread, I presume (haven’t tested) there’s no PyROOT issue and we’ll wait the fix of the bug found, then try again.

Cheers,
Wim

[quote=“wlav”]Erik,

given Rene’s answer in the other thread, I presume (haven’t tested) there’s no PyROOT issue and we’ll wait the fix of the bug found, then try again.

Cheers,
Wim[/quote]
Wim,

I agree. Let us wait and see what happens there before pyROOT is accused.

Kind Regards,
Erik