x = [1, 2.5, 3.5, 4]
y = [0.002871972681775004, 0.00514787917410944, 0.00863476098280219, 
    0.012003316194034325]
plt.plot(x, y, drawstyle='steps')
How do I plot a step function with Matplotlib in Python?