This should be easy but I have just started toying with matplotlib and python. I can do a line or a scatter plot but i am not sure how to do a simple step function. Any help
If you have non-uniformly spaced data points, you can use the drawstyle keyword argument for plot:
plot
x = [1,2.5,3.5,4] y = [0.002871972681775004, 0.00514787917410944, 0.00863476098280219, 0.012003316194034325] plt.plot(x, y, drawstyle='steps-pre')
Also available are steps-mid and steps-post.
steps-mid
steps-post