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