Line & Scatter
Aurora Bands
Layered translucent bands with aurora-like glow effect.
Output
Python
import matplotlib.pyplot as plt
import numpy as np
# === STYLE CONFIG ===
AURORA = ['#06B6D4', '#10B981', '#8B5CF6', '#EC4899']
COLORS = {
'background': '#0F172A',
'text': '#E2E8F0',
'grid': '#334155',
}
# === DATA ===
x = np.linspace(0, 10, 200)
# === FIGURE ===
fig, ax = plt.subplots(figsize=(10, 6), dpi=100)
ax.set_facecolor(COLORS['background'])
fig.patch.set_facecolor(COLORS['background'])
# === PLOT ===
for i, color in enumerate(AURORA):
# Base wave
freq = 0.8 + i * 0.15
phase = i * 0.8
y_center = 4 + i * 0.3
y = y_center + 1.2 * np.sin(freq * x + phase) + 0.4 * np.sin(2 * freq * x)
# Band thickness varies
thickness = 0.4 + 0.2 * np.sin(0.5 * x + i)
y_upper = y + thickness
y_lower = y - thickness
# Glow fill
ax.fill_between(x, y_lower, y_upper, color=color, alpha=0.15)
ax.fill_between(x, y - thickness*0.5, y + thickness*0.5, color=color, alpha=0.2)
# Edge glow
for lw, alpha in [(4, 0.1), (2, 0.3), (1, 0.6)]:
ax.plot(x, y, color=color, linewidth=lw, alpha=alpha)
# === AXES ===
ax.set_xlim(0, 10)
ax.set_ylim(0, 8)
ax.set_xlabel('Time', fontsize=10, color=COLORS['text'], labelpad=10)
ax.set_ylabel('Intensity', fontsize=10, color=COLORS['text'], labelpad=10)
# === STYLING ===
for spine in ax.spines.values():
spine.set_visible(False)
ax.tick_params(axis='both', colors=COLORS['text'], labelsize=9, length=0, pad=8)
plt.tight_layout()
plt.show()
Library
Matplotlib
Category
Pairwise Data
More Line & Scatter examples
☕