From 55771a91e40cfbf4f6e8ae4d7529b3d3728cbf87 Mon Sep 17 00:00:00 2001 From: Joris Van den Bossche Date: Mon, 13 Aug 2018 11:56:02 +0200 Subject: [PATCH] DOC: fixes to DataFrame.plot.area docstring --- pandas/plotting/_core.py | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/pandas/plotting/_core.py b/pandas/plotting/_core.py index 85b2738e572b6..4fa3b51c60ee4 100644 --- a/pandas/plotting/_core.py +++ b/pandas/plotting/_core.py @@ -3385,25 +3385,13 @@ def area(self, x=None, y=None, **kwds): .. plot:: :context: close-figs - >>> df = pd.DataFrame({ - ... 'sales': [3, 2, 3, 9, 10, 6], - ... 'signups': [5, 5, 6, 12, 14, 13], - ... 'visits': [20, 42, 28, 62, 81, 50], - ... }, index=pd.date_range(start='2018/01/01', end='2018/07/01', - ... freq='M')) >>> ax = df.plot.area(stacked=False) - Draw an area plot for each metric: + Draw an area plot for a single column: .. plot:: :context: close-figs - >>> df = pd.DataFrame({ - ... 'sales': [3, 2, 3, 9, 10, 6], - ... 'signups': [5, 5, 6, 12, 14, 13], - ... 'visits': [20, 42, 28, 62, 81, 50], - ... }, index=pd.date_range(start='2018/01/01', end='2018/07/01', - ... freq='M')) >>> ax = df.plot.area(y='sales') Draw with a different `x`: @@ -3414,9 +3402,8 @@ def area(self, x=None, y=None, **kwds): >>> df = pd.DataFrame({ ... 'sales': [3, 2, 3], ... 'visits': [20, 42, 28], - ... 'day': ['Monday', 'Tuesday', 'Wednesday'], - ... }, index=pd.date_range(start='2018/01/01', end='2018/07/01', - ... freq='M')) + ... 'day': [1, 2, 3], + ... }) >>> ax = df.plot.area(x='day') """ return self(kind='area', x=x, y=y, **kwds)