예제 #1
0
def plot_vector(v):
    try:
        is2d = v[0][0]
        _create_window_and_draw(TkPlotCanvas.PolyLine(v))
    except TypeError:
        w = []
        for i in range(len(v)):
            w.append([i, v[i]])
        _create_window_and_draw(TkPlotCanvas.PolyLine(w))
예제 #2
0
def scatter_plot(x, y):

    import TkPlotCanvas

    v = []
    for i in range(len(x)):
        v.append([x[i], y[i]])

    _create_window_and_draw(TkPlotCanvas.PolyMarker(v, fillcolor='white'))