# x = np.arange(len(labels)) # the label locations# width = 0.3 # the width of the bars# fig, ax = plt.subplots()# rects1 = ax.bar(x - width, accDict['elu'], width, label='elu')# rects2 = ax.bar(x , accDict['relu'], width, label='relu')# rects3 = ax.bar(x + width, accDict['lrelu'], width, label='lrelu')# # Add some text for labels, title and custom x-axis tick labels, etc.# ax.set_ylabel('Accuracy')# ax.set_title('accuracy of 3 methods')# ax.set_xticks(x)# ax.set_xticklabels(labels)# ax.legend()# def autolabel(rects):# """Attach a text label above each bar in *rects*, displaying its height."""# for rect in rects:# height = rect.get_height()# ax.annotate('{}'.format(height),# xy=(rect.get_x() + rect.get_width() / 2, height),# xytext=(0, 5), # 3 points vertical offset# textcoords="offset points",# ha='center', va='bottom')# autolabel(rects1)# autolabel(rects2)# autolabel(rects3)# fig.tight_layout()# plt.show()