def plot_nf(results_table): x = 'NumFlavors' df = results_table.sort(x) for (process, bin_, oqcd), process_df in df.groupby(['Observable', 'Bin', 'PDF_OrderQCD'], sort=False): fig = plt.figure() for (col, asn), pdf_df in process_df.groupby(['Collaboration', 'as_from_name'], sort=False): label = "%s(as: %s)"%(col, asn) plt.errorbar(pdf_df[x], pdf_df['CV'], yerr = np.array(pdf_df['Down68'], pdf_df['Up68']), label = label, linestyle='-', marker = 's') plot_remarks(process_df, x) plt.xlabel(r'$N_f$') plt.ylabel(r'Value of observable') xran = plotutils.extend_range(process_df[x].min(), process_df[x].max()) plt.xlim(*xran) plt.xticks(process_df[x].unique()) plt.legend() plt.title("%s PDFs, %s" % (oqcd, process_label(process, bin_)), y=1.08) plt.tight_layout() plt.grid(axis='x') yield (process, bin_, oqcd),fig
def plot_alphaS(results_table): x = 'alpha_sMref' df = results_table.sort(x) for (process, nf, bin_), process_df in df.groupby(['Observable', 'NumFlavors', 'Bin'], sort = False): fig = plt.figure() for (oqcd,col), col_df in process_df.groupby(['PDF_OrderQCD', 'Collaboration']): label = "%s (%s)" % (col, oqcd) plt.errorbar(col_df[x], col_df['CV'], yerr = np.array(col_df['Down68'], col_df['Up68']), label = label, linestyle='-', marker = 's') plot_remarks(process_df, x) plt.xlabel(r'$\alpha_S(M_%s)$' % M_REF[nf]) plt.ylabel(r'Value of observable') xran = plotutils.extend_range(process_df[x].min(), process_df[x].max()) plt.xlim(*xran) plt.legend() plt.title("%s $N_f=$%d" % (process_label(process, bin_), nf), y = 1.08) plt.tight_layout() yield (process, nf, bin_),fig