Area chart
An area chart is a line chart with the space underneath filled in. The fill stresses magnitude, such as cumulative users or stored energy, more than a bare line does.
When to use it
- The quantity is a volume or total that starts at zero.
- There's one series, or a few that don't overlap much.
Ask for it in pltchat
Upload your file and type something like:
"area chart of daily active users"
pltchat writes the loader and the plot for your columns, runs it in your browser and shows you the code.
The matplotlib code
Self-contained with example data; swap in pd.read_csv(...) or
pd.read_excel(...) for your own file.
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
rng = np.random.default_rng(15)
days = pd.date_range("2024-01-01", periods=180)
users = 1000 + np.cumsum(rng.normal(8, 30, days.size))
users += 150 * (days.day_of_week < 5)
fig, ax = plt.subplots(figsize=(6.4, 4))
ax.fill_between(days, users, alpha=0.4)
ax.plot(days, users, lw=1)
ax.set_ylim(bottom=0)
ax.set_ylabel("Daily active users")
fig.autofmt_xdate()
plt.tight_layout()
plt.show()
Upload a CSV, Excel, JSON or Parquet file. Your first plot is always free.