import json import numpy as np import matplotlib.pyplot as plt colorList = json.load(open('color/config.json','r'))["color"] import csv with open('stability.csv', 'r') as f: reader = csv.reader(f) header = next(reader) # next(reader) data = [row for row in reader] plt.figure(figsize=(6,5)) plt.bar(range(len(data)), [np.log(np.abs(float(row[2]))) for row in data] , color=colorList[0]) plt.plot([-1,len(data)],[0,0],color=colorList[2]) # x axis plt.margins(0.01) plt.xticks(range(0,len(data)), [row[3] for row in data], rotation=45) plt.xlabel('Parameters abbr.',labelpad=-3) plt.ylabel('Affect on Stability (log scale)') plt.title('Different Parameters\'s Affect on Stability') plt.savefig('result/stability-result.png',dpi=1024) plt.show()