Relative Content

Tag Archive for pythonmatplotlibanimations

Matplotlib stackplot animation

I’m creating an animation of a line plot using the attached code. I want to display the data as a stackplot instead of multiple lines on the same plot. When I change the plot type to a stackplot I get the following error: AttributeError: ‘PolyCollection’ object has no attribute ‘set_data’. How do I fix this?