Area Chart
Sparkline Area
Compact trend visualization with endpoint highlight.
Output
Python
import matplotlib.pyplot as plt
import numpy as np
# Data - Stock-like sparklines
np.random.seed(42)
days = np.arange(30)
prices = [100]
for _ in range(29):
prices.append(prices[-1] * (1 + np.random.normal(0.002, 0.02)))
prices = np.array(prices)
# Figure - DARK THEME (compact)
fig, ax = plt.subplots(figsize=(10, 3), facecolor='#0a0a0f')
ax.set_facecolor('#0a0a0f')
# Sparkline with NEON mint
color = '#27F5B0' if prices[-1] > prices[0] else '#F5276C'
ax.fill_between(days, prices.min() * 0.99, prices, alpha=0.3, color=color)
ax.plot(days, prices, color=color, linewidth=2)
ax.scatter([0, len(days)-1], [prices[0], prices[-1]], color=color, s=60, zorder=5, edgecolors='white', linewidth=1)
# Minimal styling
ax.set_xlim(0, len(days)-1)
ax.axis('off')
# Price annotation
change = ((prices[-1] - prices[0]) / prices[0]) * 100
ax.text(0.02, 0.95, f'${prices[-1]:.2f}', transform=ax.transAxes, color='white', fontsize=16, fontweight='bold', va='top')
ax.text(0.02, 0.7, f'{change:+.1f}%', transform=ax.transAxes, color=color, fontsize=12, va='top')
plt.tight_layout()
plt.show()
Library
Matplotlib
Category
Basic Charts
More Area Chart examples
☕