In [2]:
#library
import matplotlib.pyplot as plt

#Acquisition
Trials = 15
V = 0                                     #V
A = 0.5                                   
B = 0.5                                   
L = 1                                     

VData = [0 for i in range(Trials)]
Data = [0 for i in range(Trials)]

for i in range(Trials):
    Data[i] = V + sum(VData)              #VTot = sum(ΣΔV)
    VData[i] = (A*B)*(L-Data[i])          #ΔV= αβ(λ-Vtot) 
  
plt.figure()    
plt.plot(Data, 'k-o')
plt.axis([-.5, len(Data)-.5, 0, 1])

#Extinction
Trials = 15
V = 1                                     #V
A = 0.5                                   
B = 0.5                                   
L = 0                                     

VData = [0 for i in range(Trials)]
Data = [0 for i in range(Trials)]

for i in range(Trials):
    Data[i] = V + sum(VData)              #VTot = sum(ΣΔV)
    VData[i] = (A*B)*(L-Data[i])          #ΔV= αβ(λ-Vtot) 
    
plt.figure()    
plt.plot(Data, 'k-o')
plt.axis([-.5, len(Data)-.5, 0, 1])
Out[2]:
(-0.5, 14.5, 0.0, 1.0)