import matplotlib.pyplot as plt import numpy as np np.random.seed(0) TOTAL_BUDGET = 100_000 # Alpha and beta constants alphas = np.array([-9453.72, -8312.84, -7371.33]) betas = np.array([8256.21, 7764.20, 7953.36]) # Linearly spaced numbers x = np.linspace(1, TOTAL_BUDGET, TOTAL_BUDGET) # Plot the response curves fig = plt.figure(figsize=(10, 5), dpi=300) plt.plot(x, alphas[0] + betas[0] * np.log(x), color='red', label='Google Ads') plt.plot(x, alphas[1] + betas[1] * np.log(x), color='blue', label='Facebook Ads') plt.plot(x, alphas[2] + betas[2] * np.log(x), color='green', label='Twitter Ads') plt.xlabel('Budget ($)') plt.ylabel('Returns ($)') plt.legend() plt.show()