Error Bar Chart

GPU Gaming Performance

Graphics card FPS comparison at 4K and 1440p resolutions with frame time variability.

Output
GPU Gaming Performance
Python
import matplotlib.pyplot as plt
import numpy as np

np.random.seed(42)

# GPU benchmark data
gpus = ['RTX 4090', 'RTX 4080', 'RX 7900\nXTX', 'RTX 4070\nTi', 'RX 7800\nXT']
fps_4k = np.array([142, 98, 95, 72, 68])
fps_1440p = np.array([225, 168, 165, 135, 128])
err_4k = np.array([12, 8, 9, 6, 5])
err_1440p = np.array([18, 14, 15, 11, 10])

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

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

bars1 = ax.bar(x - width/2, fps_4k, width, yerr=err_4k, label='4K Ultra',
               color='#5314E6', edgecolor='#1f2937', capsize=4,
               error_kw={'ecolor': '#374151', 'elinewidth': 1.5})
bars2 = ax.bar(x + width/2, fps_1440p, width, yerr=err_1440p, label='1440p Ultra',
               color='#6CF527', edgecolor='#1f2937', capsize=4,
               error_kw={'ecolor': '#374151', 'elinewidth': 1.5})

ax.axhline(y=60, color='#F5276C', linestyle='--', linewidth=1.5, 
           label='60 FPS Target', alpha=0.7)
ax.axhline(y=144, color='#27D3F5', linestyle=':', linewidth=1.5, 
           label='144 FPS Target', alpha=0.7)

ax.set_xlabel('Graphics Card', fontsize=11, color='#374151', fontweight='500')
ax.set_ylabel('Average FPS', fontsize=11, color='#374151', fontweight='500')
ax.set_title('GPU Gaming Performance (AAA Titles Average)', fontsize=14, 
             color='#1f2937', fontweight='bold', pad=15)

ax.set_xticks(x)
ax.set_xticklabels(gpus)
ax.legend(facecolor='#f8fafc', edgecolor='#d1d5db', fontsize=9, loc='upper right')
ax.tick_params(colors='#6b7280', labelsize=9)
ax.set_ylim(0, 280)
ax.grid(True, axis='y', alpha=0.3, color='#d1d5db')
for spine in ax.spines.values():
    spine.set_color('#d1d5db')

plt.tight_layout()
plt.show()
Library

Matplotlib

Category

Statistical

Did this help you?

Support PyLucid to keep it free & growing

Support