Error Bar Chart
Streaming Platform Comparison
User ratings comparison across streaming services for content, UI/UX, and value.
Output
Python
import matplotlib.pyplot as plt
import numpy as np
np.random.seed(42)
platforms = ['Netflix', 'Disney+', 'HBO Max', 'Amazon\nPrime', 'Apple TV+']
content = np.array([4.2, 4.0, 4.5, 3.9, 4.3])
ui_ux = np.array([4.4, 4.2, 3.8, 3.7, 4.6])
value = np.array([3.5, 4.1, 3.9, 4.3, 3.2])
err = np.array([0.3, 0.25, 0.28, 0.32, 0.22])
fig, ax = plt.subplots(figsize=(11, 6), facecolor='#ffffff')
ax.set_facecolor('#ffffff')
x = np.arange(len(platforms))
width = 0.25
bars1 = ax.bar(x - width, content, width, yerr=err, label='Content Quality',
color='#F5276C', edgecolor='white', linewidth=2, capsize=4,
error_kw={'ecolor': '#374151', 'elinewidth': 1.5, 'capthick': 1.5})
bars2 = ax.bar(x, ui_ux, width, yerr=err, label='UI/UX',
color='#27D3F5', edgecolor='white', linewidth=2, capsize=4,
error_kw={'ecolor': '#374151', 'elinewidth': 1.5, 'capthick': 1.5})
bars3 = ax.bar(x + width, value, width, yerr=err, label='Value for Money',
color='#6CF527', edgecolor='white', linewidth=2, capsize=4,
error_kw={'ecolor': '#374151', 'elinewidth': 1.5, 'capthick': 1.5})
ax.set_xlabel('Platform', fontsize=12, color='#374151', fontweight='600')
ax.set_ylabel('Rating (out of 5)', fontsize=12, color='#374151', fontweight='600')
ax.set_title('Streaming Platform Comparison', fontsize=15,
color='#1f2937', fontweight='bold', pad=20)
ax.set_xticks(x)
ax.set_xticklabels(platforms, fontsize=11)
ax.legend(facecolor='#ffffff', edgecolor='#e5e7eb', fontsize=10,
framealpha=1, loc='lower right')
ax.tick_params(colors='#6b7280', labelsize=10)
ax.set_ylim(2.5, 5.2)
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
☕