@@ -3345,9 +3345,9 @@ def area(self, x=None, y=None, **kwds):
3345
3345
Parameters
3346
3346
----------
3347
3347
x : label or position, optional
3348
- Index, coordinates for X axis.
3348
+ Coordinates for the X axis. By default uses the index .
3349
3349
y : label or position, optional
3350
- Index, coordinates for Y axis .
3350
+ Column to plot. By default uses all columns .
3351
3351
stacked : boolean, default True
3352
3352
Area plots are stacked by default. Set to False to create a
3353
3353
unstacked plot.
@@ -3375,7 +3375,8 @@ def area(self, x=None, y=None, **kwds):
3375
3375
... 'sales': [3, 2, 3, 9, 10, 6],
3376
3376
... 'signups': [5, 5, 6, 12, 14, 13],
3377
3377
... 'visits': [20, 42, 28, 62, 81, 50],
3378
- ... })
3378
+ ... }, index=pd.date_range(start='2018/01/01', end='2018/07/01',
3379
+ ... freq='M'))
3379
3380
>>> ax = df.plot.area()
3380
3381
3381
3382
Area plots are stacked by default. To produce an unstacked plot,
@@ -3388,7 +3389,8 @@ def area(self, x=None, y=None, **kwds):
3388
3389
... 'sales': [3, 2, 3, 9, 10, 6],
3389
3390
... 'signups': [5, 5, 6, 12, 14, 13],
3390
3391
... 'visits': [20, 42, 28, 62, 81, 50],
3391
- ... })
3392
+ ... }, index=pd.date_range(start='2018/01/01', end='2018/07/01',
3393
+ ... freq='M'))
3392
3394
>>> ax = df.plot.area(stacked=False)
3393
3395
3394
3396
Draw an area plot for each metric:
@@ -3400,10 +3402,9 @@ def area(self, x=None, y=None, **kwds):
3400
3402
... 'sales': [3, 2, 3, 9, 10, 6],
3401
3403
... 'signups': [5, 5, 6, 12, 14, 13],
3402
3404
... 'visits': [20, 42, 28, 62, 81, 50],
3403
- ... })
3405
+ ... }, index=pd.date_range(start='2018/01/01', end='2018/07/01',
3406
+ ... freq='M'))
3404
3407
>>> ax = df.plot.area(y='sales')
3405
- >>> ax = df.plot.area(y='signups')
3406
- >>> ax = df.plot.area(y='visits')
3407
3408
3408
3409
Draw with a different `x`:
3409
3410
@@ -3414,7 +3415,8 @@ def area(self, x=None, y=None, **kwds):
3414
3415
... 'sales': [3, 2, 3],
3415
3416
... 'visits': [20, 42, 28],
3416
3417
... 'day': ['Monday', 'Tuesday', 'Wednesday'],
3417
- ... })
3418
+ ... }, index=pd.date_range(start='2018/01/01', end='2018/07/01',
3419
+ ... freq='M'))
3418
3420
>>> ax = df.plot.area(x='day')
3419
3421
"""
3420
3422
return self (kind = 'area' , x = x , y = y , ** kwds )
0 commit comments