# %%

import numpy as np
from scipy.stats import norm
import pandas as pd


x = np.linspace(0, 10, 100)
y = []

for i, (loc, sd) in enumerate([(5,.5),(7,1)]):
  cost = 2 if i == 0 else 1
  y.append(norm.pdf(x,loc,sd) * cost)


df = pd.DataFrame({'x': x})
df[['s0','s1']] = np.array(y).T
df = df.melt(id_vars='x',value_name='pdf',var_name='stimulus')


import matplotlib.pyplot as plt
import seaborn as sns

sns.lineplot(data=df,x='x',y='pdf',hue='stimulus')

plt.vlines([5.978,5.667,5.830,2.69],
           ymin=0,ymax=1.6,
           colors=['r','g','b','y'],
           lw=1, linestyles='--')
