Error Bar Chart
Gaming Performance Console vs PC
Frame rate comparison across PS5, Xbox Series X, and high-end PC for AAA games.
Output
Python
import matplotlib.pyplot as plt
import numpy as np
np.random.seed(42)
games = ['Cyberpunk', 'Elden Ring', 'Hogwarts', 'Starfield', 'Spider-Man 2']
ps5 = np.array([35, 55, 45, 30, 58])
xbox = np.array([32, 52, 42, 35, 55])
pc = np.array([85, 120, 95, 75, 110])
ps5_err = np.array([5, 8, 6, 5, 7])
xbox_err = np.array([5, 7, 5, 6, 6])
pc_err = np.array([15, 20, 15, 12, 18])
fig, ax = plt.subplots(figsize=(11, 6), facecolor='#ffffff')
ax.set_facecolor('#ffffff')
x = np.arange(len(games))
width = 0.25
ax.bar(x - width, ps5, width, yerr=ps5_err, label='PS5',
color='#276CF5', edgecolor='white', linewidth=1.5, capsize=3,
error_kw={'ecolor': '#374151', 'elinewidth': 1.5})
ax.bar(x, xbox, width, yerr=xbox_err, label='Xbox Series X',
color='#6CF527', edgecolor='white', linewidth=1.5, capsize=3,
error_kw={'ecolor': '#374151', 'elinewidth': 1.5})
ax.bar(x + width, pc, width, yerr=pc_err, label='PC (High-End)',
color='#F5276C', edgecolor='white', linewidth=1.5, capsize=3,
error_kw={'ecolor': '#374151', 'elinewidth': 1.5})
ax.axhline(y=60, color='#F5B027', linestyle='--', linewidth=2, alpha=0.8)
ax.set_xlabel('Game', fontsize=12, color='#374151', fontweight='600')
ax.set_ylabel('Average FPS', fontsize=12, color='#374151', fontweight='600')
ax.set_title('Gaming Performance: Console vs PC', fontsize=15,
color='#1f2937', fontweight='bold', pad=20)
ax.set_xticks(x)
ax.set_xticklabels(games, fontsize=11)
ax.legend(facecolor='#ffffff', edgecolor='#e5e7eb', fontsize=10)
ax.tick_params(colors='#6b7280', labelsize=10)
ax.set_ylim(0, 160)
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
☕