def plot_setup(p): pylab.ylabel("Overhead [\%]") pylab.yscale('log') pylab.xscale('log', basex=2) pylab.xticks( list(scipy.unique(group['symbols'])), list(scipy.unique(group['symbols']))) plotter.set_slave_info(slavename) plotter.set_markers(p) for (slavename, symbols), group in sparse: p = group.pivot_table('mean', rows='symbols', cols=['field', 'density']).plot() plot_setup(p) plotter.set_legend_title("(Field, Density)") plotter.write("sparse", slavename) for (slavename, symbols), group in dense: p = group.pivot_table('mean', rows='symbols', cols=['field', 'algorithm']).plot() plot_setup(p) plotter.set_legend_title("(Field, Algorithm)") plotter.write("dense", slavename) return df if __name__ == '__main__': args = plot_helper.add_arguments(["json", "date", "output-format"]) df = plot(args)
def plot_setup(p): pylab.ylabel("Extra symbols [{}]".format(list(group['unit'])[0])) pylab.xscale('log', basex=2) pylab.xticks(list(scipy.unique(group['symbols']))) plotter.set_slave_info(slavename) plotter.set_markers(p) for (slavename, symbols), group in sparse: p = group.pivot_table('mean', rows='symbols', cols=['field', 'density']).plot() plot_setup(p) plotter.set_legend_title("(Field, Density)") plotter.write("sparse", slavename) for (slavename, symbols), group in dense: p = group.pivot_table('mean', rows='symbols', cols=['field', 'algorithm']).plot() plot_setup(p) plotter.set_legend_title("(Field, Algorithm)") plotter.write("dense", slavename) return df if __name__ == '__main__': args = plot_helper.add_arguments(["json", "date", "output-format"]) df = plot(args)
pylab.ylabel("Throughput gain [\%]") pylab.xscale('log', basex=2) pylab.xticks( list(scipy.unique(group['symbols'])), list(scipy.unique(group['symbols']))) plotter.set_markers(p) plotter.set_slave_info(slavename) for symbols, group in sparse: p = group.pivot_table( 'gain', rows='symbols', cols=['field', 'density']).plot() plot_setup(p) plotter.set_legend_title("(Field, Density)") plotter.write("sparse", slavename) for symbols, group in dense: p = group.pivot_table('gain', rows='symbols', cols=['field', 'algorithm']).plot() plot_setup(p) plotter.set_legend_title("(Field, Algorithm)") plotter.write("dense", slavename) return df if __name__ == '__main__': args = plot_helper.add_arguments( ["coder", "date", "days", "output-format"]) df = plot(args)