if name not in args.ignore: output = [cur + "," + str(round(val,args.round)).ljust(args.round+2,'0') for cur, val in \ zip(output, kv.values(name, key_order = print_order))] if args.print_table: if not args.no_header: print ','.join(['%s' % (set_name) for set_name in set_order]) for line in output: print line # ------------------------------------------------------------------------------ # Plot data if requested # ------------------------------------------------------------------------------ if args.plot: plot = PlotLib() plot.set_plot_dimensions(args.plot_width, args.plot_height) if args.y_tics_step is not None: plot.set_y_tics_step(args.y_tics_step) elif args.normalize is not None: plot.set_y_tics_step(0.1) plot.set_ceiling(args.ceiling) legend = [name for name in set_order if name not in args.ignore] if args.no_legend: legend = [] plot.set_legend_shift(args.legend_x_shift, args.legend_y_shift)
from plotlib import PlotLib import numpy as np # create random data x = np.arange(23) y = np.random.randint(8, 20, 23) y2 = np.random.randint(8, 20, 23) # load a figure fig = PlotLib() print(fig.fig) fig.plot_fill(x, y, legend='y') fig2 = PlotLib() # create two subplots a = fig2.get_subplot(1, 2, 0, 1) b = fig2.get_subplot(1, 2, 0, 0) # plot data on subplots a.plot_fill(x, y, legend='y') b.plot_fill(x, y, legend='y') a.plot_fill(x, y2, legend='y2') print("finished main thread!") input("press enter to continue") a.plot_fill(x, y2 + y, legend='y2+y')