renardo renardo - 2 months ago 9
Python Question

Is it possible to stack line graphs with df.plot() and if not how can it be done?

enter image description here

I want to create something like this figure with a dataframe that contains 9 columns.

Answer

Use the area type:

df.plot(kind='area')

Starting pandas version 0.17:

df.plot.area()
Comments