Example #1
0
def plotted(objs, product):
    fig = plt.figure()
    gs = fig.add_gridspec(2, 2)
    x1 = render_file(getfile(objs[0]))
    x2 = render_file(getfile(objs[1]))
    x3 = render_file(getfile(objs[2]))
    x4 = render_file(getfile(objs[3]))
    plot_single(x1, product, fig, gs, 0, 0)
    plot_single(x2, product, fig, gs, 0, 1)
    plot_single(x3, product, fig, gs, 1, 0)
    plot_single(x4, product, fig, gs, 1, 1)
    plt.show()
Example #2
0
def plot_all(objs):
    fig = plt.figure()
    gs = fig.add_gridspec(6, len(objs))
    for i in range(len(objs)):
        display = render_file(objs[i])
        plotter(display, fig, gs, i)
    plt.show()
Example #3
0
def plot_same_product(objs, product):
    fig = plt.figure()
    w = math.floor(len(objs) /
                   2) if len(objs) % 2 == 0 else math.floor(len(objs) / 3)
    #w = len(objs)
    h = math.floor(len(objs) / 2)
    gs = fig.add_gridspec(w, h)
    print(w, gs)
    for y in range(h):
        for x in range(w):
            f = objs[x + y]
            display = render_file(f)
            print(f, x, y)
            plot_single(display, product, fig, gs, x, y)
    plt.show()
Example #4
0
def render_single(f, product):
    display = render_file(f)
    one_plot(display, product)
Example #5
0
def render_same_product(objs, product):
    for f in objs:
        display, b64 = render_file(f)
        render_frame(display, f, product, b64)