Error Bar Chart
Home Workout App Comparison
Fitness app comparison for workout variety, trainer quality, and value.
Output
Python
import matplotlib.pyplot as plt
import numpy as np
np.random.seed(42)
apps = ['Peloton', 'Nike\nTraining', 'Apple\nFitness+', 'FitOn', 'Centr']
workout_variety = np.array([95, 88, 85, 78, 82])
trainer_quality = np.array([92, 85, 90, 75, 88])
price_value = np.array([65, 92, 70, 95, 72])
err = np.array([4, 5, 4, 6, 5])
fig, ax = plt.subplots(figsize=(10, 6), facecolor='#ffffff')
ax.set_facecolor('#ffffff')
x = np.arange(len(apps))
width = 0.25
ax.bar(x - width, workout_variety, width, yerr=err, label='Workout Variety',
color='#F5276C', edgecolor='white', linewidth=1.5, capsize=4,
error_kw={'ecolor': '#374151', 'elinewidth': 1.5})
ax.bar(x, trainer_quality, width, yerr=err, label='Trainer Quality',
color='#F5B027', edgecolor='white', linewidth=1.5, capsize=4,
error_kw={'ecolor': '#374151', 'elinewidth': 1.5})
ax.bar(x + width, price_value, width, yerr=err, label='Value for Price',
color='#6CF527', edgecolor='white', linewidth=1.5, capsize=4,
error_kw={'ecolor': '#374151', 'elinewidth': 1.5})
ax.set_xlabel('Fitness App', fontsize=12, color='#374151', fontweight='600')
ax.set_ylabel('Score', fontsize=12, color='#374151', fontweight='600')
ax.set_title('Home Workout App Comparison', fontsize=15,
color='#1f2937', fontweight='bold', pad=20)
ax.set_xticks(x)
ax.set_xticklabels(apps, fontsize=10)
ax.legend(facecolor='#ffffff', edgecolor='#e5e7eb', fontsize=10)
ax.tick_params(colors='#6b7280', labelsize=10)
ax.set_ylim(50, 105)
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
More Error Bar Chart examples
☕