def draw_axes(x0, y0, xscale, yscale, xmax, ymax, nx, ny):
    print '.5 setlinewidth'
    print '/Times-Roman 12 selectfont'
    print x0, y0, 'moveto', xscale * xmax, '0 rlineto 0', yscale * ymax, 'rlineto', -xscale * xmax, '0 rlineto closepath stroke'
    xinc = (xmax * xscale * 1.) / nx
    yinc = (ymax * yscale * 1.) / ny
    for i in range(0, nx + 1):
        if i > 0 and i < nx + 1:
            print x0 + xinc * i, y0, 'moveto 0 6 rlineto stroke'
            print x0 + xinc * i, y0 + ymax * yscale, 'moveto 0 -6 rlineto stroke'
        print x0 + xinc * i, y0 - 12, 'moveto'
        print '(%.2g) dup stringwidth exch -.5 mul exch rmoveto show' % ((i * xmax * 1.) / nx)
    for i in range(0, ny + 1):
        if i > 0 and i < ny + 1:
            print x0, y0 + yinc * i, 'moveto 6 0 rlineto stroke'
            print x0 + xmax * xscale, y0 + yinc * i, 'moveto -6 0 rlineto stroke'
        print x0 - 3, y0 + 3.5 - yinc * i, 'moveto'
        print '(%.2g) dup stringwidth exch neg exch rmoveto show' % ((i * ymax * 1.) / ny)
dataset/ETHPy150Open google/roboto/third_party/spiro/curves/mecsolve.py/draw_axes/swapped operands of `-`