Python: Plotting equation with the Dirac Delta function
Use the scipy library function
in this example
import numpy as np
from scipy import signal
number_points =100
location_of_impulse= 60
it_theta=signal.unit_impulse(number_points ,location_of_impulse)
you'll have to do your own scaling
By the the way the following is a direct copy from the SCIPY sit and may be more illuminating
..........................................................................
import numpy as np
from scipy import signal
import matplotlib.pyplot as plt
imp = signal.unit_impulse(100, 40)
b, a = signal.butter(4, 0.2)
response = signal.lfilter(b, a, imp)

plt.plot(np.arange(-50, 50), imp)
plt.plot(np.arange(-50, 50), response)
plt.margins(0.1, 0.1)
plt.xlabel('Time [samples]')
plt.ylabel('Amplitude')
plt.grid(True)
'