The signals in matplotlib functionality are plotted by joining 2 points.
So if the signal values are say
y-axis:  0,1,2,3,4…
X-axis (time): 0, 10, 20, 30, 40….

then it draws a line which joins these points and the signal that we see is a straight line ramping in upward direction.

But I want to draw the signal such that it should hold the signal value till the next point so that the signal now seen is like a step ramp signal.

So for the above example till time = 10 the value should be 0 and again from time = 10 to time =20 value should be 1.

Does anyone have an idea how to draw such signals with matplotlib functionality

Best Regards,