@@ -3345,9 +3345,9 @@ def area(self, x=None, y=None, **kwds):
33453345 Parameters
33463346 ----------
33473347 x : label or position, optional
3348- Index, coordinates for X axis.
3348+ Coordinates for the X axis. By default uses the index .
33493349 y : label or position, optional
3350- Index, coordinates for Y axis .
3350+ Column to plot. By default uses all columns .
33513351 stacked : boolean, default True
33523352 Area plots are stacked by default. Set to False to create a
33533353 unstacked plot.
@@ -3375,7 +3375,8 @@ def area(self, x=None, y=None, **kwds):
33753375 ... 'sales': [3, 2, 3, 9, 10, 6],
33763376 ... 'signups': [5, 5, 6, 12, 14, 13],
33773377 ... 'visits': [20, 42, 28, 62, 81, 50],
3378- ... })
3378+ ... }, index=pd.date_range(start='2018/01/01', end='2018/07/01',
3379+ ... freq='M'))
33793380 >>> ax = df.plot.area()
33803381
33813382 Area plots are stacked by default. To produce an unstacked plot,
@@ -3388,7 +3389,8 @@ def area(self, x=None, y=None, **kwds):
33883389 ... 'sales': [3, 2, 3, 9, 10, 6],
33893390 ... 'signups': [5, 5, 6, 12, 14, 13],
33903391 ... 'visits': [20, 42, 28, 62, 81, 50],
3391- ... })
3392+ ... }, index=pd.date_range(start='2018/01/01', end='2018/07/01',
3393+ ... freq='M'))
33923394 >>> ax = df.plot.area(stacked=False)
33933395
33943396 Draw an area plot for each metric:
@@ -3400,10 +3402,9 @@ def area(self, x=None, y=None, **kwds):
34003402 ... 'sales': [3, 2, 3, 9, 10, 6],
34013403 ... 'signups': [5, 5, 6, 12, 14, 13],
34023404 ... 'visits': [20, 42, 28, 62, 81, 50],
3403- ... })
3405+ ... }, index=pd.date_range(start='2018/01/01', end='2018/07/01',
3406+ ... freq='M'))
34043407 >>> ax = df.plot.area(y='sales')
3405- >>> ax = df.plot.area(y='signups')
3406- >>> ax = df.plot.area(y='visits')
34073408
34083409 Draw with a different `x`:
34093410
@@ -3414,7 +3415,8 @@ def area(self, x=None, y=None, **kwds):
34143415 ... 'sales': [3, 2, 3],
34153416 ... 'visits': [20, 42, 28],
34163417 ... 'day': ['Monday', 'Tuesday', 'Wednesday'],
3417- ... })
3418+ ... }, index=pd.date_range(start='2018/01/01', end='2018/07/01',
3419+ ... freq='M'))
34183420 >>> ax = df.plot.area(x='day')
34193421 """
34203422 return self (kind = 'area' , x = x , y = y , ** kwds )
0 commit comments