Pandas DataFrame: plot.area() function
DataFrame.plot.area() function
An area plot displays quantitative data visually. This function wraps the matplotlib area function.
Syntax:
DataFrame.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 Value: True |
Required |
**kwds | Additional keyword arguments are documented in DataFrame.plot(). | int or float Default Value: 0 |
Optional |
Returns: matplotlib.axes.Axes or numpy.ndarray
Area plot, or array of area plots if subplots is True.
Example:
Download the Pandas DataFrame Notebooks from here.
Previous: DataFrame - tz_localize() function
Next: DataFrame.plot.bar() function
- Weekly Trends
- Python Interview Questions and Answers: Comprehensive Guide
- Scala Exercises, Practice, Solution
- Kotlin Exercises practice with solution
- MongoDB Exercises, Practice, Solution
- SQL Exercises, Practice, Solution - JOINS
- Java Basic Programming Exercises
- SQL Subqueries
- Adventureworks Database Exercises
- C# Sharp Basic Exercises
- SQL COUNT() with distinct
- JavaScript String Exercises
- JavaScript HTML Form Validation
- Java Collection Exercises
- SQL COUNT() function
- SQL Inner Join