ax.xaxis.set_ticks([0.125, 0.25, 0.5, 1, 2, 4]) ax.xaxis.set_ticklabels('0.125 0.25 0.5 1 2 4'.split()) ax.yaxis.set_major_formatter(ScalarFormatter()) minvs = min(min(vs) for vs in results.values()) maxvs = max(max(vs) for vs in results.values()) if args.xaxis == 'load': ax.set_xlim(1 - args.xmin if args.xmin is not None else maxvs, 1 - args.xmax if args.xmax is not None else 0.00098) else: ax.set_xlim(args.xmin if args.xmin is not None else minvs, args.xmax if args.xmax is not None else maxvs) if args.ymin is not None: ax.set_ylim(bottom=args.ymin) if args.ymax is not None: ax.set_ylim(top=args.ymax) if not args.nolatex: import plot_helpers plot_helpers.config_paper(20) plt.tight_layout(1) if args.save is not None: plt.savefig(args.save) else: plt.show()
ax.legend(loc=0, ncol=2) ax.tick_params(axis='x', pad=7) ax.xaxis.set_ticks([0.125, 0.25, 0.5, 1, 2, 4]) ax.xaxis.set_ticklabels('0.125 0.25 0.5 1 2 4'.split()) ax.yaxis.set_major_formatter(ScalarFormatter()) minvs = min(min(vs) for vs in results.values()) maxvs = max(max(vs) for vs in results.values()) ax.set_xlim(args.xmin if args.xmin is not None else minvs, args.xmax if args.xmax is not None else maxvs) if args.ymin is not None: ax.set_ylim(bottom=args.ymin) if args.ymax is not None: ax.set_ylim(top=args.ymax) if not args.nolatex: import plot_helpers plot_helpers.config_paper(20) plt.tight_layout(1) if args.save is not None: plt.savefig(args.save) else: plt.show()