GeezerVison is showing python-graph-gallery.com — Python Area Chart Examples with Code
Area Chart
An area chart is really similar to a line chart, except that the area between the x axis and the line is filled in with color or shading. It represents the evolution of a numeric variable. This section starts by considering matplotlib and seaborn as tools to build area charts. It then shows a few other options for timeseries.
# libraryimport numpy as npimport matplotlib.pyplot as plt# Create datax=range(1,6)y=[1,4,6,8,4]# Area plotplt.fill_between(x, y)plot.show()
Area chart with Matplotlib
Matplotlib is a great fit to build an area chart thanks to its fill_between() function. Here are a few examples explaining its basics and how to apply some common customization.
Seaborn is another great alternative to build an area chart with python. The below examples show how to start basic, apply usual customization, and use the small multiple technique for when you have several groups to compare.
The web is full of astonishing charts made by awesome bloggers, (often using R). The Python graph gallery tries to display (or translate from R) some of the best creations and explain how their source code works. If you want to display your work here, please drop me a word or even better, submit a Pull Request!
I have spent years collecting the most beautiful data visualizations out there. Get the list of my top 300 dataviz projects, hand-picked, for free.
I respect your privacy. Unsubscribe anytime.
You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.