Stream Graph

Browser Market Share Stream

Stream graph showing web browser market share evolution with neon aesthetic.

Output
Browser Market Share Stream
Python
import matplotlib.pyplot as plt
import numpy as np

COLORS = {
    'background': '#0a0a0f',
    'text': '#ffffff',
    'grid': '#333333',
}

np.random.seed(2121)
months = np.arange(0, 60)  # 5 years

chrome = 60 + 0.2 * months + 3 * np.sin(months * np.pi / 12) + np.random.normal(0, 2, 60)
safari = 18 + 0.1 * months + np.random.normal(0, 1, 60)
firefox = 12 - 0.1 * months + np.random.normal(0, 1, 60)
edge = 5 + 0.15 * months + np.random.normal(0, 0.5, 60)
others = 5 - 0.05 * months + np.random.normal(0, 0.5, 60)

data = [np.clip(d, 1, None) for d in [chrome, safari, firefox, edge, others]]
colors = ['#4285F4', '#A2AAAD', '#FF7139', '#0078D7', '#27F5B0']

fig, ax = plt.subplots(figsize=(14, 6), facecolor=COLORS['background'])
ax.set_facecolor(COLORS['background'])

ax.stackplot(months, *data, colors=colors, alpha=0.85, baseline='sym',
             labels=['Chrome', 'Safari', 'Firefox', 'Edge', 'Others'])

ax.axhline(0, color=COLORS['grid'], linewidth=0.5, alpha=0.5)
ax.set_xlim(0, 59)

ax.set_title('Browser Market Share Evolution', color=COLORS['text'], fontsize=14, fontweight='bold', pad=15)
ax.set_xlabel('Month', 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

Did this help you?

Support PyLucid to keep it free & growing

Support