Error Bar Chart

Code Review Team Metrics

Software engineering code review time and bug detection by team.

Output
Code Review Team Metrics
Python
import matplotlib.pyplot as plt
import numpy as np

np.random.seed(42)

teams = ['Frontend', 'Backend', 'DevOps', 'Mobile', 'Data']
review_time = np.array([4.2, 6.5, 3.8, 5.2, 7.8])
bugs_found = np.array([3.5, 5.2, 2.8, 4.1, 6.2])
time_err = np.array([1.2, 1.8, 0.8, 1.5, 2.2])
bugs_err = np.array([0.8, 1.2, 0.5, 1.0, 1.5])

fig, ax = plt.subplots(figsize=(10, 6), facecolor='#ffffff')
ax.set_facecolor('#ffffff')

x = np.arange(len(teams))
width = 0.35

ax.bar(x - width/2, review_time, width, yerr=time_err, label='Review Time (hrs)',
       color='#4927F5', edgecolor='white', linewidth=1.5, capsize=5,
       error_kw={'ecolor': '#374151', 'elinewidth': 2})
ax.bar(x + width/2, bugs_found, width, yerr=bugs_err, label='Bugs Found (avg)',
       color='#F5B027', edgecolor='white', linewidth=1.5, capsize=5,
       error_kw={'ecolor': '#374151', 'elinewidth': 2})

ax.set_xlabel('Team', fontsize=12, color='#374151', fontweight='600')
ax.set_ylabel('Value', fontsize=12, color='#374151', fontweight='600')
ax.set_title('Code Review Metrics by Team', fontsize=15, 
             color='#1f2937', fontweight='bold', pad=20)

ax.set_xticks(x)
ax.set_xticklabels(teams, fontsize=11)
ax.legend(facecolor='#ffffff', edgecolor='#e5e7eb', fontsize=11)
ax.tick_params(colors='#6b7280', labelsize=10)
ax.set_ylim(0, 12)
ax.grid(True, axis='y', alpha=0.4, color='#e5e7eb')
ax.spines['top'].set_visible(False)
ax.spines['right'].set_visible(False)
ax.spines['left'].set_color('#d1d5db')
ax.spines['bottom'].set_color('#d1d5db')

plt.tight_layout()
plt.show()
Library

Matplotlib

Category

Statistical

Did this help you?

Support PyLucid to keep it free & growing

Support