def make(figure_name, target_dir="../../Figures"): make_figs(figure_name, saveFigs, drawFigs, target_dir)
# %% {"code_folding": []} # Plot some key results print('Aggregate savings as a function of aggregate market resources:') fig = plt.figure() bottom = 0.1 top = 2*KSEconomy.kSS x = np.linspace(bottom,top,1000,endpoint=True) print(KSEconomy.AFunc) y0 = KSEconomy.AFunc[0](x) y1 = KSEconomy.AFunc[1](x) plt.plot(x,y0) plt.plot(x,y1) plt.xlim([bottom, top]) make_figs('aggregate_savings', True, False) # remark.show('aggregate_savings') print('Consumption function at each aggregate market resources gridpoint (in general equilibrium):') KSAgent.unpackcFunc() m_grid = np.linspace(0,10,200) KSAgent.unpackcFunc() for M in KSAgent.Mgrid: c_at_this_M = KSAgent.solution[0].cFunc[0](m_grid,M*np.ones_like(m_grid)) #Have two consumption functions, check this plt.plot(m_grid,c_at_this_M) make_figs('consumption_function', True, False) # remark.show('consumption_function') print('Savings at each individual market resources gridpoint (in general equilibrium):')
def makeFig(figure_name, target_dir="../../Figures"): print('') make_figs(figure_name, saveFigs, drawFigs, target_dir) print('')