Stream Graph
ML Framework Usage Stream
Stream visualization of machine learning framework adoption trends.
Output
Python
import matplotlib.pyplot as plt
import numpy as np
COLORS = {
'background': '#0a0a0f',
'text': '#ffffff',
'grid': '#333333',
}
np.random.seed(3737)
quarters = np.arange(0, 24)
tensorflow = 40 + 0.3 * quarters + 3 * np.sin(quarters * np.pi / 6) + np.random.normal(0, 2, 24)
pytorch = 20 + 1.2 * quarters + np.random.normal(0, 2, 24)
sklearn = 25 + 0.2 * quarters + np.random.normal(0, 1, 24)
keras = 10 - 0.2 * quarters + np.random.normal(0, 1, 24)
jax = 2 + 0.5 * quarters + np.random.normal(0, 0.5, 24)
data = [np.clip(d, 1, None) for d in [tensorflow, pytorch, sklearn, keras, jax]]
colors = ['#FF6F00', '#EE4C2C', '#F89939', '#D00000', '#5E35B1']
fig, ax = plt.subplots(figsize=(14, 6), facecolor=COLORS['background'])
ax.set_facecolor(COLORS['background'])
ax.stackplot(quarters, *data, colors=colors, alpha=0.85, baseline='sym',
labels=['TensorFlow', 'PyTorch', 'Scikit-learn', 'Keras', 'JAX'])
ax.axhline(0, color=COLORS['grid'], linewidth=0.5, alpha=0.5)
ax.set_xlim(0, 23)
ax.set_title('ML Framework Popularity', color=COLORS['text'], fontsize=14, fontweight='bold', pad=15)
ax.set_xlabel('Quarter', color=COLORS['text'], fontsize=11)
ax.set_ylabel('Usage (%)', 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
☕