@@ -38,7 +38,6 @@ tags: [hide-output]
38
38
39
39
``` {code-cell} ipython
40
40
import matplotlib.pyplot as plt
41
- plt.rcParams["figure.figsize"] = (11, 5) #set default figure size
42
41
import numpy as np
43
42
import quantecon as qe
44
43
from sympy import init_printing, symbols, Matrix
@@ -447,10 +446,10 @@ for t in range(T):
447
446
448
447
``` {code-cell} python3
449
448
plt.figure()
450
- plt.plot(range(T+1), m_seq, label='$m_t$')
451
- plt.plot(range(T+1), p_seq, label='$p_t$')
449
+ plt.plot(range(T+1), m_seq, label=r '$m_t$')
450
+ plt.plot(range(T+1), p_seq, label=r '$p_t$')
452
451
plt.xlabel('t')
453
- plt.title(f 'λ={λ}, α={α}, $ρ_1$={ρ1}, $ρ_2$={ρ2}')
452
+ plt.title(rf 'λ={λ}, α={α}, $ρ_1$={ρ1}, $ρ_2$={ρ2}')
454
453
plt.legend()
455
454
plt.show()
456
455
```
@@ -938,8 +937,8 @@ for δ in [-0.05, 0, 0.05]:
938
937
plt.plot(m_range, [magic_p0(m0, δ=δ) for m0 in m_range], label=f"δ={δ}")
939
938
plt.legend()
940
939
941
- plt.xlabel("$m_0$")
942
- plt.ylabel("$p_0$")
940
+ plt.xlabel(r "$m_0$")
941
+ plt.ylabel(r "$p_0$")
943
942
plt.show()
944
943
```
945
944
@@ -951,9 +950,9 @@ m0 = 1
951
950
952
951
δ_range = np.linspace(-0.05, 0.05, 100)
953
952
plt.plot(δ_range, [magic_p0(m0, δ=δ) for δ in δ_range])
954
- plt.xlabel('$\delta$')
955
- plt.ylabel('$p_0$')
956
- plt.title(f '$m_0$={m0}')
953
+ plt.xlabel(r '$\delta$')
954
+ plt.ylabel(r '$p_0$')
955
+ plt.title(rf '$m_0$={m0}')
957
956
plt.show()
958
957
```
959
958
0 commit comments