Please note, this is a STATIC archive of website www.w3resource.com from 19 Jul 2022, cach3.com does not collect or store any user information, there is no "phishing" involved.

Examples
Draw an area plot based on basic business metrics:

In [1]:
import numpy as np
import pandas as pd
In [2]:
df = pd.DataFrame({
    'sales': [4, 2, 4, 16, 20, 8],
    'signups': [7, 7, 8, 15, 17, 16],
    'visits': [30, 52, 38, 72, 91, 60],
}, index=pd.date_range(start='2019/01/01', end='2019/07/01',
                       freq='M'))
ax = df.plot.area()

Area plots are stacked by default:
To produce an unstacked plot, pass stacked=False:

In [3]:
ax = df.plot.area(stacked=False)

Draw an area plot for a single column:

In [4]:
ax = df.plot.area(y='sales')

Draw with a different x:

In [5]:
df = pd.DataFrame({
     'sales': [4, 2, 4],
     'visits': [30, 52, 38],
     'day': [1, 2, 3],
})
ax = df.plot.area(x='day')