GitHub

@@ -38,7 +38,6 @@ tags: [hide-output]

38383939

```{code-cell} ipython

4040

import matplotlib.pyplot as plt

41-

plt.rcParams["figure.figsize"] = (11, 5) #set default figure size

4241

import numpy as np

4342

import quantecon as qe

4443

from sympy import init_printing, symbols, Matrix

@@ -447,10 +446,10 @@ for t in range(T):

447446448447

```{code-cell} python3

449448

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$')

452451

plt.xlabel('t')

453-

plt.title(f'λ={λ}, α={α}, $ρ_1$={ρ1}, $ρ_2$={ρ2}')

452+

plt.title(rf'λ={λ}, α={α}, $ρ_1$={ρ1}, $ρ_2$={ρ2}')

454453

plt.legend()

455454

plt.show()

456455

```

@@ -938,8 +937,8 @@ for δ in [-0.05, 0, 0.05]:

938937

plt.plot(m_range, [magic_p0(m0, δ=δ) for m0 in m_range], label=f"δ={δ}")

939938

plt.legend()

940939941-

plt.xlabel("$m_0$")

942-

plt.ylabel("$p_0$")

940+

plt.xlabel(r"$m_0$")

941+

plt.ylabel(r"$p_0$")

943942

plt.show()

944943

```

945944

@@ -951,9 +950,9 @@ m0 = 1

951950952951

δ_range = np.linspace(-0.05, 0.05, 100)

953952

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}')

957956

plt.show()

958957

```

959958

Read the original on github.com ↗