Exemplo n.º 1
0
def process_data(data):

    Xs = [i['x'] for i in data]
    Ys = [i['y'] for i in data]
    cluster_in = np.column_stack((Xs, Ys))
    cluster = Cluster(cluster_in, eps=0.35, min_samples=3)
    cluster.plot(fig=plt)
    plt.xlim(-10, 10)
    plt.ylim(-0.9, 18)
    plt.pause(0.00000001)
    plt.clf()
Exemplo n.º 2
0
def json_process(json_out):
    data = json_out["frame"]
    Xs = [i['x'] for i in data]
    Ys = [i['y'] for i in data]
    cluster_in = np.column_stack((Xs, Ys))
    cluster = Cluster(cluster_in, eps=0.35, min_samples=3)
    cluster.plot(fig=plt)
    plt.xlim(-10, 10)
    plt.ylim(-0.9, 18)
    plt.pause(0.00000001)
    plt.clf()
Exemplo n.º 3
0
def json_process(json_out):
    data = json_out["frame"]
    Xs = [i['x'] for i in data]
    Ys = [i['y'] for i in data]
    cluster_in = np.column_stack((Xs, Ys))
    cluster = Cluster(cluster_in, eps=0.35, min_samples=3)
    cluster.plot(fig=plt)
    # plt.scatter(Xs, Ys)
    plt.xlim(-10, 10)
    plt.ylim(-0.9, 18)
    # plt.set_xbound(lower=xmin, upper=xmax)
    # plt.set_ybound(lower=ymin, upper=ymax)
    plt.pause(0.00000001)
    plt.clf()