pandas.Series.plot.area
pandas 3.1.1 · Series and accessors · method
Plot filled areas to emphasize magnitude across an ordered axis.
Call syntax
Series.plot.area(x=None, y=None, stacked=True, **kwargs)Inspect the call
Run this code to inspect the callable and its parameters. Its data, backend, or environment is needed to execute the operation itself.
Parameters
| Parameter | Requirement | Accepted values and behavior |
|---|---|---|
x |
Optional Positional or keyword Default None |
label or position Choose the column or positional input mapped to the horizontal axis. |
y |
Optional Positional or keyword Default None |
label or position Choose the column or positional input mapped to the vertical axis. |
stacked |
Optional Positional or keyword Default True |
bool |
**kwargs |
Optional Additional keyword arguments |
Returns
matplotlib.axes.Axes or numpy.ndarray of them
Example for a local Python session
import pandas as pd
import matplotlib
values = pd.Series([2., 5., 7.], name="units")
print(values.plot.area())