for bench in df.benchmark.unique(): fig, axes = plt.subplots(nrows=2, ncols=2, figsize=(10,5)) fig.suptitle("Benchmark: " + bench + ".C") for opt in df.optimization.unique(): if opt == "O2": i=0 j=0 if opt == "O3": i=0 j=1 if opt == "O4": i=1 j=0 if opt == "O5":  i=1 j=1 df2=df.loc[(df['benchmark'] == bench) & (df['optimization'] == opt)] plot = df2.pivot(index="cores", columns="smt").plot(kind="bar",  color=my_colors, sharex='col', width=0.8, ax=axes[i,j],  ylim=(0.95*min(df2.speedup), 1.05*max(df2.speedup)), y="speedup", title=opt) plot.legend(loc=1, prop={'size': 8}) fig.tight_layout() fig.show() Figure 9-3 Performance benefits from a rational choice of SMT mode for the bt.C benchmark Chapter 9. Measuring and tuning applications  265