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