Stream Graph
Crypto Market Dominance Stream
Stream graph showing cryptocurrency market dominance shifts over time with neon aesthetic.
Output
Python
import matplotlib.pyplot as plt
import numpy as np
COLORS = {
'layers': ['#F5B027', '#276CF5', '#F5276C', '#27F5B0', '#4927F5', '#6CF527'],
'background': '#0a0a0f',
'text': '#ffffff',
'grid': '#333333',
}
np.random.seed(2024)
months = np.arange(0, 48) # 4 years
# Market dominance simulation
btc = 60 - 0.3 * months + 10 * np.sin(months * np.pi / 12) + np.random.normal(0, 3, 48)
eth = 15 + 0.2 * months + 5 * np.cos(months * np.pi / 8) + np.random.normal(0, 2, 48)
sol = 3 + 0.15 * months + np.random.exponential(2, 48)
ada = 5 + 3 * np.sin(months * np.pi / 10) + np.random.normal(0, 1, 48)
bnb = 4 + 0.1 * months + np.random.normal(0, 1, 48)
others = 13 + 0.1 * months + np.random.normal(0, 2, 48)
# Ensure positive values
data = [np.clip(d, 1, None) for d in [btc, eth, sol, ada, bnb, others]]
fig, ax = plt.subplots(figsize=(14, 6), facecolor=COLORS['background'])
ax.set_facecolor(COLORS['background'])
ax.stackplot(months, *data, colors=COLORS['layers'], alpha=0.85, baseline='sym',
labels=['BTC', 'ETH', 'SOL', 'ADA', 'BNB', 'Others'])
ax.axhline(0, color=COLORS['grid'], linewidth=0.5, alpha=0.5)
ax.set_xlim(0, 47)
ax.set_title('Cryptocurrency Market Dominance', color=COLORS['text'], fontsize=14, fontweight='bold', pad=15)
ax.set_xlabel('Months', color=COLORS['text'], fontsize=11)
ax.set_ylabel('Market Share (%)', color=COLORS['text'], fontsize=11)
ax.legend(loc='upper center', bbox_to_anchor=(0.5, -0.12), frameon=False, labelcolor=COLORS['text'], fontsize=9, ncol=5)
for spine in ax.spines.values():
spine.set_visible(False)
ax.tick_params(colors=COLORS['text'], labelsize=9)
plt.tight_layout()
plt.subplots_adjust(bottom=0.18)
plt.show()
Library
Matplotlib
Category
Time Series
More Stream Graph examples
☕