def paint(self, g):
        if self.function is None:
            return self.error(g)

        sz = self.size
        xs = range(0, sz.width, 2)

        xscale = 4*pi/sz.width
        xoffset = -2*pi

        yscale = -sz.height/2.
        yoffset = sz.height/2.

        ys = []
        for x in xs:
            x = xscale*x + xoffset
            y = int(yscale/self.function(x)+yoffset)
            ys.append(y)
        g.drawPolyline(array(xs, 'i'), array(ys, 'i'), len(xs))
dataset/ETHPy150Open azoft-dev-team/imagrium/env/Lib/test/Graph.py/Graph.paint/operator `*` -> `/`