databricks.koalas.DataFrame.plot.area

plot.area(x=None, y=None, stacked=True, **kwds)

Draw a stacked area plot.

An area plot displays quantitative data visually. This function wraps the matplotlib area function.

Parameters
xlabel or position, optional

Coordinates for the X axis. By default uses the index.

ylabel or position, optional

Column to plot. By default uses all columns.

stackedbool, default True

Area plots are stacked by default. Set to False to create a unstacked plot.

**kwdsoptional

Additional keyword arguments are documented in DataFrame.plot().

Returns
matplotlib.axes.Axes or numpy.ndarray

Area plot, or array of area plots if subplots is True.

Examples

>>> df = ks.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'))
>>> plot = df.plot.area()
../../_images/databricks-koalas-DataFrame-plot-area-1.png