import matplotlib.pyplot as plt
import numpy as np
import arviz as az
from pymc_marketing.mmm.transformers import root_saturation
plt.style.use('arviz-darkgrid')
alpha = np.array([0.1, 0.3, 0.5, 0.7])
x = np.linspace(0, 5, 100)
ax = plt.subplot(111)
for a in alpha:
    y = root_saturation(x, alpha=a)
    plt.plot(x, y, label=f'alpha = {a}')
plt.xlabel('spend', fontsize=12)
plt.ylabel('f(spend)', fontsize=12)
box = ax.get_position()
ax.set_position([box.x0, box.y0, box.width * 0.8, box.height])
ax.legend(loc='center left', bbox_to_anchor=(1, 0.5))
plt.show()