Area Chart
Modern Fill Between
Range visualization with mean line and markers.
Output
Python
import matplotlib.pyplot as plt
import numpy as np
# Data
np.random.seed(42)
x = np.linspace(0, 10, 100)
y_mean = 3 + np.sin(x) * 1.5
y_std = 0.3 + 0.2 * np.abs(np.sin(x * 2))
y_upper = y_mean + y_std * 2
y_lower = y_mean - y_std * 2
# Figure - DARK THEME
fig, ax = plt.subplots(figsize=(10, 6), facecolor='#0a0a0f')
ax.set_facecolor('#0a0a0f')
# Plot with NEON colors
ax.fill_between(x, y_lower, y_upper, alpha=0.3, color='#27D3F5', label='Range')
ax.plot(x, y_mean, color='#27D3F5', linewidth=2.5, label='Mean')
ax.scatter(x[::10], y_mean[::10], color='#F5276C', s=50, zorder=5, edgecolors='white', linewidth=0.5)
# Styling
ax.set_xlabel('Time', color='white', fontsize=11)
ax.set_ylabel('Value', color='white', fontsize=11)
ax.set_title('Signal Range with Mean', color='white', fontsize=14, fontweight='bold', pad=15)
ax.tick_params(colors='#888888', labelsize=9)
for spine in ax.spines.values():
spine.set_color('#333333')
ax.yaxis.grid(True, color='#1a1a2e', linewidth=0.5)
ax.legend(facecolor='#0a0a0f', edgecolor='#333333', labelcolor='white')
ax.set_xlim(0, 10)
plt.tight_layout()
plt.show()
Library
Matplotlib
Category
Basic Charts
More Area Chart examples
☕