Matplotlib plot only horizontal lines in step plot

Viewed 3122

I am using matplotlib to plot some step functions from a dataframe

df['s1'].plot(c='b', drawstyle="steps-post")
df['s2'].plot(c='b', drawstyle="steps-post")
...

The result looks like

enter image description here

I would like to have this only plot the horizontal lines, not the vertical lines connecting the jump points. I could not find a straightforward parameter for plot that would seem to do that. Is there a way to do this?

1 Answers
Related