'How to make a stackplot with steps in Python

This sounds like a simple question, but I have not been able to find an answer to it. I can make a simple stackplot using matplotlib.pyplot stackplot like: enter image description here

but I want it to be stepwise, like when you use the step() plotting function in matplotlib.pyplot. I have not been able to combine the two ways of plotting.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source