Skip to content

Commit 8d07a13

Browse files
authored
Update cake_eating_problem.md
1 parent 243022a commit 8d07a13

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lectures/cake_eating_problem.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ kernelspec:
3838

3939
```{code-cell} ipython
4040
import matplotlib.pyplot as plt
41+
import matplotlib as mpl
42+
FONTPATH = "fonts/SourceHanSerifSC-SemiBold.otf"
43+
mpl.font_manager.fontManager.addfont(FONTPATH)
44+
plt.rcParams['font.family'] = ['Source Han Serif SC']
45+
4146
import numpy as np
4247
```
4348
## 模型
@@ -213,7 +218,7 @@ x_grid = np.linspace(0.1, 5, 100)
213218
214219
fig, ax = plt.subplots()
215220
216-
ax.plot(x_grid, v_star(x_grid, β, γ), label='value function')
221+
ax.plot(x_grid, v_star(x_grid, β, γ), label='价值函数')
217222
218223
ax.set_xlabel('$x$', fontsize=12)
219224
ax.legend(fontsize=12)

0 commit comments

Comments
 (0)