Exemplo n.º 1
0
    if args.no_legend:
        legend = []
    plot.set_legend_shift(args.legend_x_shift, args.legend_y_shift)

    if args.plot_line:
        xtics = range(0, (len(workload_order)/args.x_tics_step)*args.x_tics_step + args.x_tics_step - 1,\
            args.x_tics_step)
        lines = [[(i,val) for i,val in enumerate(kv.values(name, key_order = \
            workload_order))] for name in set_order if name not in args.ignore]
        plot.continuous_lines(lines, legend, value_base = args.value_base, \
            xtics = xtics, x_padding = args.x_padding, use_markers = 0)

    else:
        plot.column_stacked_bars(workload_order, [kv.values(name, key_order = \
            workload_order)  for name in set_order if name not in args.ignore],\
            legend, value_base = args.value_base)

    if args.title is not None:
        plot.title(args.title)
    if args.y_label is not None:
        plot.ylabel(args.y_label)
    plot.xlabel(args.x_label)
    if args.output == "pdf":
        plot.save_pdf(args.plot_name)
        plot.save_tikz(args.plot_name + "_tikz.tex")
        plot.save_tex(args.plot_name)
    elif args.output == "tex":
        plot.save_tex(args.plot_name)
    elif args.output == "tikz":
        plot.save_tikz(args.plot_name + ".tex")
Exemplo n.º 2
0
plot = PlotLib()

legend = eflegend
plot.set_y_tics_step(efystep)
plot.set_y_tics_shift(0)
plot.set_legend_shift(-50, -10)
plot.set_plot_dimensions(150, 80)
plot.set_scale(0.5)
plot.set_y_tics_font_size("scriptsize")
plot.set_x_tics_font_size("scriptsize")
plot.set_y_label_font_size("small")
plot.set_x_label_font_size("small")
plot.set_ceiling(0.8)

plot.xlabel(efxlabel, yshift=-10, fontsize="small", options="[scale=0.8]")
plot.ylabel(efylabel, xshift=-2, fontsize="small", options="[scale=0.8]")

plot.continuous_lines(efdata,
                      legend=legend,
                      xtics=eaffrac,
                      use_markers=2,
                      x_padding=5)

#plot.column_stacked_bars(workload_order, [kv.values(name, key_order = workload_order) for name in mechanisms], legend)
plot.save_pdf(efplotname)
plot.save_tikz(efplotname + ".tex")

# plot = PlotLib()

# legend = bflegend
# plot.set_y_tics_step(bfystep)
Exemplo n.º 3
0
legend = eflegend
plot.set_y_tics_step(efystep)
plot.set_y_tics_shift(0)
plot.set_legend_shift(-50,-10)
plot.set_plot_dimensions(150,80)
plot.set_scale(0.5)
plot.set_y_tics_font_size("scriptsize")
plot.set_x_tics_font_size("scriptsize")
plot.set_y_label_font_size("small")
plot.set_x_label_font_size("small")
plot.set_ceiling(0.8)

plot.xlabel(efxlabel, yshift = -10, fontsize = "small", options =
"[scale=0.8]")
plot.ylabel(efylabel, xshift = -2, fontsize = "small", options = "[scale=0.8]")

plot.continuous_lines(efdata, legend = legend, xtics = eaffrac, use_markers = 2, x_padding = 5)
                      
#plot.column_stacked_bars(workload_order, [kv.values(name, key_order = workload_order) for name in mechanisms], legend)
plot.save_pdf(efplotname)
plot.save_tikz(efplotname + ".tex")


# plot = PlotLib()

# legend = bflegend
# plot.set_y_tics_step(bfystep)
# plot.set_y_tics_shift(0)
# plot.set_legend_shift(-50,-10)
# plot.set_plot_dimensions(150,80)
Exemplo n.º 4
0
for name, values in data.iteritems():
    kv.add_data(name, values)
kv.extract_keys()

print(kv.keys())

#mechanisms = mechanisms[1:]

plot = PlotLib()
legend = mechanisms[:]
plot.set_y_tics_step(0.1)
plot.set_y_tics_shift(0)
plot.set_legend_shift(-50, -10)
plot.set_plot_dimensions(220, 80)
plot.set_scale(0.5)
plot.set_y_tics_font_size("scriptsize")
plot.set_x_tics_font_size("scriptsize")
plot.set_y_label_font_size("small")
plot.set_x_label_font_size("small")
plot.set_ceiling(0.85)
plot.xlabel("Workloads", yshift=-10, fontsize="small", options="")
plot.ylabel(sys.argv[2], xshift=-2, fontsize="small", options="")
plot.column_stacked_bars(
    workload_order,
    [kv.values(name, key_order=workload_order) for name in mechanisms],
    legend,
    key_padding=0.3,
    value_base=0)
plot.save_pdf(os.path.basename(sys.argv[1]))
plot.save_tikz(os.path.basename(sys.argv[1]) + ".tex")
Exemplo n.º 5
0
    for i,mech in enumerate(mechanisms):
        data[mech][key] = values[i]

kv = KeyValueData()
for name, values in data.iteritems():
    kv.add_data(name, values)
kv.extract_keys()

print (kv.keys())

#mechanisms = mechanisms[1:]

plot = PlotLib()
legend = mechanisms[:]
plot.set_y_tics_step(0.1)
plot.set_y_tics_shift(0)
plot.set_legend_shift(-50,-10)
plot.set_plot_dimensions(220,80)
plot.set_scale(0.5)
plot.set_y_tics_font_size("scriptsize")
plot.set_x_tics_font_size("scriptsize")
plot.set_y_label_font_size("small")
plot.set_x_label_font_size("small")
plot.set_ceiling(0.85)
plot.xlabel("Workloads", yshift = -10, fontsize = "small", options =
"")
plot.ylabel(sys.argv[2], xshift = -2, fontsize = "small", options = "")
plot.column_stacked_bars(workload_order, [kv.values(name, key_order = workload_order) for name in mechanisms], legend, key_padding = 0.3, value_base = 0)
plot.save_pdf(os.path.basename(sys.argv[1]))
plot.save_tikz(os.path.basename(sys.argv[1]) + ".tex")
Exemplo n.º 6
0
        legend = []
    plot.set_legend_shift(args.legend_x_shift, args.legend_y_shift)

    if args.plot_line:
        xtics = range(0, (len(workload_order)/args.x_tics_step)*args.x_tics_step + args.x_tics_step - 1,\
            args.x_tics_step)
        lines = [[(i,val) for i,val in enumerate(kv.values(name, key_order = \
            workload_order))] for name in set_order if name not in args.ignore]
        plot.continuous_lines(lines, legend, value_base = args.value_base, \
            xtics = xtics, x_padding = args.x_padding, use_markers = 0)

    else:
        plot.column_stacked_bars(workload_order, [kv.values(name, key_order = \
            workload_order)  for name in set_order if name not in args.ignore],\
            legend, value_base = args.value_base)


    if args.title is not None:
        plot.title(args.title)
    if args.y_label is not None:
        plot.ylabel(args.y_label)
    plot.xlabel(args.x_label)
    if args.output == "pdf":
        plot.save_pdf(args.plot_name)
        plot.save_tikz(args.plot_name + "_tikz.tex")
        plot.save_tex(args.plot_name)
    elif args.output == "tex":
        plot.save_tex(args.plot_name)
    elif args.output == "tikz":
        plot.save_tikz(args.plot_name + ".tex")