days = np.arange(1, 7) control = np.array([2.1, 2.4, 2.8, 3.0, 3.4, 3.7]) treatment = np.array([2.0, 2.7, 3.4, 4.1, 4.6, 5.0]) fig, ax = plt.subplots(figsize=(width_in, height_in), layout="constrained") ax.plot(days, control, marker="o", linewidth=1.4, label="Control") ax.plot(days, treatment, marker="s", linewidth=1.4, label="Treatment") ax.set_title("Response over time") ax.set_xlabel("Day") ax.set_ylabel("Mean response") ax.grid(True, linewidth=0.4, alpha=0.35) ax.legend(frameon=False)