Area Chart
Layered Mountains
Multi-layer area creating depth effect.
Output
Python
import matplotlib.pyplot as plt
import numpy as np
# Data - Mountain layers
np.random.seed(42)
x = np.linspace(0, 10, 200)
def mountain_layer(x, peaks, heights, widths):
y = np.zeros_like(x)
for p, h, w in zip(peaks, heights, widths):
y += h * np.exp(-(x - p)**2 / (2 * w**2))
return y
layers = [
mountain_layer(x, [2, 5, 8], [3, 4, 2.5], [0.8, 1.0, 0.7]),
mountain_layer(x, [1, 4, 7, 9], [2.5, 3, 2, 1.5], [0.6, 0.8, 0.7, 0.5]),
mountain_layer(x, [0.5, 3, 6, 8.5], [2, 2.5, 2, 1.8], [0.5, 0.6, 0.6, 0.5]),
]
colors = ['#4927F5', '#27D3F5', '#6CF527']
# Figure - DARK THEME
fig, ax = plt.subplots(figsize=(12, 6), facecolor='#0a0a0f')
ax.set_facecolor('#0a0a0f')
# Stacked mountain layers
for i, (layer, color) in enumerate(zip(layers, colors)):
baseline = sum(layers[:i]) if i > 0 else np.zeros_like(x)
ax.fill_between(x, baseline, baseline + layer, color=color, alpha=0.7)
ax.plot(x, baseline + layer, color=color, linewidth=1.5, alpha=0.9)
# Styling
ax.set_xlim(0, 10)
ax.set_ylim(0, 10)
ax.axis('off')
ax.set_title('Layered Landscape', color='white', fontsize=14, fontweight='bold', pad=15, loc='left')
plt.tight_layout()
plt.show()
Library
Matplotlib
Category
Basic Charts
More Area Chart examples
☕