Stackplot
Sprint Velocity
Story points by type per sprint.
Output
Python
import matplotlib.pyplot as plt
import numpy as np
COLORS = {
'feature': '#6366F1',
'bug': '#EF4444',
'tech_debt': '#F59E0B',
'improvement': '#10B981',
'background': '#FFFFFF',
'text': '#1E293B',
'text_muted': '#64748B',
'grid': '#F1F5F9'
}
sprints = np.arange(1, 13)
feature = [20, 25, 28, 30, 32, 35, 38, 40, 42, 45, 48, 50]
bug = [8, 10, 6, 5, 7, 4, 5, 3, 4, 3, 2, 2]
tech_debt = [5, 6, 8, 10, 8, 12, 10, 15, 12, 10, 15, 12]
improvement = [7, 9, 8, 10, 8, 9, 12, 12, 12, 12, 15, 16]
fig, ax = plt.subplots(figsize=(10, 6), dpi=100)
ax.set_facecolor(COLORS['background'])
fig.patch.set_facecolor(COLORS['background'])
ax.stackplot(sprints, feature, bug, tech_debt, improvement,
colors=[COLORS['feature'], COLORS['bug'], COLORS['tech_debt'], COLORS['improvement']],
alpha=0.85, labels=['Features', 'Bugs', 'Tech Debt', 'Improvements'])
ax.spines['top'].set_visible(False)
ax.spines['right'].set_visible(False)
ax.spines['left'].set_color(COLORS['grid'])
ax.spines['bottom'].set_color(COLORS['grid'])
ax.yaxis.grid(True, color=COLORS['grid'], linewidth=1, zorder=0)
ax.set_axisbelow(True)
ax.tick_params(axis='both', colors=COLORS['text_muted'], labelsize=9, length=0, pad=8)
ax.set_xlim(1, 12)
ax.set_xlabel('Sprint', fontsize=10, color=COLORS['text'], labelpad=10)
ax.set_ylabel('Story Points', fontsize=10, color=COLORS['text'], labelpad=10)
ax.legend(loc='upper center', bbox_to_anchor=(0.5, -0.12), ncol=4, frameon=False, fontsize=9, labelcolor=COLORS['text_muted'])
plt.tight_layout()
plt.show()
Library
Matplotlib
Category
Basic Charts
More Stackplot examples
☕