Simulación
Haz Clic para ver el Código
```{python}
import numpy as np
import matplotlib.pyplot as plt
def ley_efecto_relativa(r_0):
k = 200
r_1 = np.linspace(1, 200, 1000)
resp = k * r_1 / (r_1 + r_0)
# Gráfica.
fig, ax = plt.subplots(figsize= (12, 7))
ax.plot(r_1, resp, color = "#976894", lw = 3.5, alpha = 0.75, label = f"$r_0$ = {r_0}")
# Axis labels
ax.set_title('Ley del efecto relativa', pad=15, fontsize = 30)
ax.set_xlabel(r"Refuerzo $(r_1)$", size = 15, labelpad=2)
ax.set_ylabel(r"Respuesta $(R_1)$", size = 15, labelpad=2)
ax.set_ylim(0, 205)
ax.set_xlim(0, 202)
plt.legend()
plt.show()
ley_efecto_relativa(r_0 = 50)
```