Area Chart

Concentric Bands

Nested confidence bands around center line.

Output
Concentric Bands
Python
import matplotlib.pyplot as plt
import numpy as np

# Data
x = np.linspace(0, 10, 100)
y_center = 50 + 10*np.sin(x)
bands = [5, 10, 15, 20]

# Figure - LIGHT THEME
fig, ax = plt.subplots(figsize=(10, 6), facecolor='#ffffff')
ax.set_facecolor('#ffffff')

# Concentric bands with NEON purple gradient
colors = ['#4927F5', '#6B47F7', '#8D67F9', '#AF87FB']
alphas = [0.15, 0.2, 0.25, 0.3]

for band, color, alpha in zip(reversed(bands), reversed(colors), reversed(alphas)):
    ax.fill_between(x, y_center - band, y_center + band, color=color, alpha=alpha)

ax.plot(x, y_center, color='#4927F5', linewidth=2.5, label='Center line')

# Styling
ax.set_xlabel('Time', color='#1f2937', fontsize=11)
ax.set_ylabel('Value', color='#1f2937', fontsize=11)
ax.set_title('Uncertainty Bands', color='#1f2937', fontsize=14, fontweight='bold', pad=15)
ax.tick_params(colors='#374151', labelsize=9)
for spine in ax.spines.values():
    spine.set_color('#e5e7eb')
ax.spines['top'].set_visible(False)
ax.spines['right'].set_visible(False)
ax.yaxis.grid(True, color='#f3f4f6', linewidth=0.5)
ax.set_xlim(0, 10)
ax.legend(facecolor='#ffffff', edgecolor='#e5e7eb', labelcolor='#1f2937')

plt.tight_layout()
plt.show()
Library

Matplotlib

Category

Basic Charts

Did this help you?

Support PyLucid to keep it free & growing

Support