Pandas Series: plot.area() function
Series-plot.area() function
The plot.area() function is used to draw a stacked area plot.
An area plot displays quantitative data visually. This function wraps the matplotlib area function.
Syntax:
Series.plot.area(self, x=None, y=None, **kwargs)
Parameters:
Name | Description | Type/Default Value | Required / Optional |
---|---|---|---|
x | Coordinates for the X axis. By default uses the index. | label or position | Optional |
y | Column to plot. By default uses all columns. | label or position | Optional |
stacked | Area plots are stacked by default. Set to False to create a unstacked plot. | bool, default True | Optional |
**kwds | Additional keyword arguments are documented in DataFrame.plot(). | Optional |
Returns: matplotlib.axes.Axes or numpy.ndarray
Area plot, or array of area plots if subplots is True.
Example:
Download the Pandas Series Notebooks from here.
Previous: Series-cat.rename_categories() function
Next: Series-plot.bar() function
- New Content published on w3resource:
- HTML-CSS Practical: Exercises, Practice, Solution
- Java Regular Expression: Exercises, Practice, Solution
- Scala Programming Exercises, Practice, Solution
- Python Itertools exercises
- Python Numpy exercises
- Python GeoPy Package exercises
- Python Pandas exercises
- Python nltk exercises
- Python BeautifulSoup exercises
- Form Template
- Composer - PHP Package Manager
- PHPUnit - PHP Testing
- Laravel - PHP Framework
- Angular - JavaScript Framework
- Vue - JavaScript Framework
- Jest - JavaScript Testing Framework