Stream Graph
Remote Work Adoption Stream
Stream graph showing remote work adoption patterns across different industries post-2020.
Output
Python
import matplotlib.pyplot as plt
import numpy as np
COLORS = {
'layers': ['#3B82F6', '#10B981', '#F59E0B', '#8B5CF6', '#EF4444'],
'background': '#ffffff',
'text': '#1f2937',
'grid': '#e5e7eb',
}
np.random.seed(1515)
months = np.arange(0, 48) # 4 years
# Industries
tech = 40 + 30 / (1 + np.exp(-(months - 6) / 3)) + np.random.normal(0, 3, 48)
finance = 20 + 25 / (1 + np.exp(-(months - 8) / 4)) + np.random.normal(0, 3, 48)
healthcare = 10 + 15 / (1 + np.exp(-(months - 10) / 5)) + np.random.normal(0, 2, 48)
education = 15 + 35 / (1 + np.exp(-(months - 5) / 2)) - 10 * (months > 24) + np.random.normal(0, 3, 48)
retail = 5 + 10 / (1 + np.exp(-(months - 12) / 6)) + np.random.normal(0, 1, 48)
data = [np.clip(d, 1, None) for d in [tech, finance, healthcare, education, retail]]
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=['Technology', 'Finance', 'Healthcare', 'Education', 'Retail'])
ax.axhline(0, color=COLORS['grid'], linewidth=0.5)
ax.set_xlim(0, 47)
ax.set_title('Remote Work Adoption by Industry (2020-2024)', color=COLORS['text'], fontsize=14, fontweight='bold', pad=15)
ax.set_xlabel('Month (from Jan 2020)', color=COLORS['text'], fontsize=11)
ax.set_ylabel('Remote Workers (%)', color=COLORS['text'], fontsize=11)
# Legend below plot
ax.legend(loc='upper center', bbox_to_anchor=(0.5, -0.12), frameon=False, fontsize=9, ncol=5)
for spine in ax.spines.values():
spine.set_color(COLORS['grid'])
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
☕