C=1 Cb=1e7 def f2(x): return 1 - C*x/Cb import numpy as np import json import matplotlib.pyplot as plt colorList = json.load(open('color/config.json','r'))["color"] plt.plot(np.arange(1e6,5e6,1e5),f2(np.arange(1e6,5e6,1e5)),label='Ienv',color=colorList[0]) plt.xlabel('total passengers') plt.ylabel('Ienv') plt.legend() plt.show()