def METHOD_NAME(plot, W, xmin=0.0, xmax=2.0, numPnts=200, Hdet=1.0, title='',
          lineTitle=''):
    dx = (xmax - xmin)/(numPnts - 1)
    x = numpy.array(list(range(numPnts)))
    y = numpy.array([0.0]*numPnts)
    i1,i2,i3 = 0,0,0
    x = dx*x + xmin
    for i in range(numPnts):
        y[i] = W(x[i], Hdet)
        if (i>0):
            i1 += abs(y[i]+y[i-1])/2.0 * dx
            i2 += abs(y[i]+y[i-1])/2.0 * dx * x[i]
            i3 += abs(y[i]+y[i-1])/2.0 * dx * x[i]*x[i]
    Pi = 3.14159
    print("{0:3.3f} {1:3.3f} {2:3.3f}".format(i1*2.0,i2*2.0,i3))
    plot('set xrange [0:1]')
    plot.xlabel('eta')
    plot.ylabel('W')
    if title:
        plot.title(title)
    ymax = 0
    for i in range(numPnts):
        if abs(y[i]) > ymax:
            ymax = abs(y[i])
    data = Gnuplot.Data(x/xmax, y/ymax, with_='lines', title=lineTitle)
    plot.replot(data)
    plot('set xrange[0:1]')
    return