Esempio n. 1
0
def run(fs):
    for f in fs:
        figure()

        s = Samplex()
        f(s)
        s.start()
        print s.data

        xs = []
        ys = []
        cs = []
        #for v, [sol,c] in s.next(10):
        for sol in s.next(1000):
            pass
            #print v
            #           if not xs:
            #               cs.append('g')
            #           else:
            #               cs.append('b')
            #xs.append(v[1])
            #ys.append(v[2])

            xs.append(sol[1])
            ys.append(sol[2])
            #cs.append(c)

        scatter(xs, ys)

    show()
Esempio n. 2
0
def run(fs):
    for f in fs:
        figure()

        s = Samplex()
        f(s)
        s.start()
        print s.data

        xs = []
        ys = []
        cs = []
        for v, [sol, c] in s.next(10000):
            pass
            #print v
            if not xs:
                cs.append('g')
            else:
                cs.append('b')
            xs.append(v[1])
            ys.append(v[2])

            xs.append(sol[1])
            ys.append(sol[2])
            cs.append(c)

        scatter(xs, ys, c=cs)

    show()
Esempio n. 3
0
def run(fs):
    for f in fs:
        figure()

        s = Samplex()
        f(s)
        s.start()
        print s.data

        xs = []
        ys = []
        cs = []
        #for v, [sol,c] in s.next(10):
        for sol in s.next(1000):
            pass
            #print v
#           if not xs:
#               cs.append('g')
#           else:
#               cs.append('b')
            #xs.append(v[1])
            #ys.append(v[2])

            xs.append(sol[1])
            ys.append(sol[2])
            #cs.append(c)

        scatter(xs, ys)

    show()
Esempio n. 4
0
def run(fs):
    for f in fs:
        figure()

        s = Samplex()
        f(s)
        s.start()
        print s.data

        xs = []
        ys = []
        cs = []
        for v, [sol,c] in s.next(10000):
            pass
            #print v
            if not xs:
                cs.append('g')
            else:
                cs.append('b')
            xs.append(v[1])
            ys.append(v[2])

            xs.append(sol[1])
            ys.append(sol[2])
            cs.append(c)

        scatter(xs, ys, c=cs)

    show()