Error Bar Chart

Work Mode Productivity

Productivity metrics comparison across remote, hybrid, and office work arrangements.

Output
Work Mode Productivity
Python
import matplotlib.pyplot as plt
import numpy as np

np.random.seed(42)

metrics = ['Focus\nTime', 'Meetings\nEfficiency', 'Work-Life\nBalance', 'Collaboration', 'Innovation']
remote = np.array([82, 75, 88, 68, 72])
hybrid = np.array([78, 82, 80, 85, 80])
office = np.array([72, 78, 65, 90, 85])
err = np.array([6, 5, 7, 6, 8])

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

x = np.arange(len(metrics))
width = 0.25

ax.bar(x - width, remote, width, yerr=err, label='Fully Remote',
       color='#4927F5', edgecolor='white', linewidth=1.5, capsize=4,
       error_kw={'ecolor': '#374151', 'elinewidth': 1.5})
ax.bar(x, hybrid, width, yerr=err, label='Hybrid',
       color='#27F5B0', edgecolor='white', linewidth=1.5, capsize=4,
       error_kw={'ecolor': '#374151', 'elinewidth': 1.5})
ax.bar(x + width, office, width, yerr=err, label='Office-Based',
       color='#F54927', edgecolor='white', linewidth=1.5, capsize=4,
       error_kw={'ecolor': '#374151', 'elinewidth': 1.5})

ax.axhline(y=75, color='#9ca3af', linestyle='--', linewidth=1.5, alpha=0.7)

ax.set_xlabel('Metric', fontsize=12, color='#374151', fontweight='600')
ax.set_ylabel('Score (%)', fontsize=12, color='#374151', fontweight='600')
ax.set_title('Work Mode Productivity Metrics', fontsize=15, 
             color='#1f2937', fontweight='bold', pad=20)

ax.set_xticks(x)
ax.set_xticklabels(metrics, fontsize=10)
ax.legend(facecolor='#ffffff', edgecolor='#e5e7eb', fontsize=10)
ax.tick_params(colors='#6b7280', labelsize=10)
ax.set_ylim(50, 100)
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