Skip to content

Commit

Permalink
More color adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
lynn-chien committed Aug 16, 2024
1 parent cff04f6 commit de58dcc
Show file tree
Hide file tree
Showing 8 changed files with 122 additions and 139 deletions.
34 changes: 14 additions & 20 deletions content/01-demand/02-example.ipynb

Large diffs are not rendered by default.

53 changes: 19 additions & 34 deletions content/02-supply/01-supply.ipynb

Large diffs are not rendered by default.

67 changes: 37 additions & 30 deletions content/02-supply/03-sympy.ipynb

Large diffs are not rendered by default.

67 changes: 32 additions & 35 deletions content/02-supply/04-market-equilibria.ipynb

Large diffs are not rendered by default.

Binary file not shown.
6 changes: 3 additions & 3 deletions content/02-supply/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
import numpy as np
import pandas as pd
from matplotlib import patches
import csaps
from csaps import csaps

def firm_behaviour(price, individual_firm_costs):
fig = plt.figure()
ax = fig.add_axes([0,0,1,1])

output = individual_firm_costs.column("Output")[1:]
mc = individual_firm_costs.column("Marginal Cost")[1:]
sp_mc = csaps.UnivariateCubicSmoothingSpline(output, mc, smooth=0.85)
sp_mc = csaps(output, mc, smooth=0.85)
output_s = np.linspace(output.min(), output.max(), 150)
mc_s = sp_mc(output_s)

plt.plot(individual_firm_costs.column("Output")[1:], individual_firm_costs.column("Average Variable Cost")[1:],marker='o')
plt.plot(individual_firm_costs.column("Output")[1:], individual_firm_costs.column("Average Total Cost")[1:], marker='o')
plt.plot(individual_firm_costs.column("Output")[1:], individual_firm_costs.column("Average Total Cost")[1:], color='#2D8A3E', marker='^')
plt.plot(output, mc, 's', color = 'tab:red')
plt.plot(output_s, mc_s, alpha=0.7, lw = 2, label='_nolegend_', color = 'tab:red')
plt.xlabel('Quantity')
Expand Down
Binary file not shown.
34 changes: 17 additions & 17 deletions content/06-inequality/historical-inequality.ipynb

Large diffs are not rendered by default.

0 comments on commit de58dcc

Please sign in to comment.