Matlibplot Step Function Index 0
Hi I am trying to plot this using matplotlib's step function from matplotlib.pyplot import step, show, xlim time = [0.0, 0.0, 0.0, 25.3039, 25.5539, 25.8049, 45.8699, 46.1209, 46.
Solution 1:
You need to set where step should step (doc). The default is that the locations are interpreted as the right edge, you want the locations interpreted as the left edge.
step(time,value,where='post')
See Step function in matplotlib for a longer explanation/example.
Post a Comment for "Matlibplot Step Function Index 0"