Error Bar Chart

Web Browser Performance Scores

Browser comparison for speed, memory efficiency, and privacy.

Output
Web Browser Performance Scores
Python
import matplotlib.pyplot as plt
import numpy as np

np.random.seed(42)

browsers = ['Chrome', 'Firefox', 'Safari', 'Edge', 'Brave']
speed = np.array([92, 88, 95, 90, 91])
memory = np.array([65, 85, 90, 75, 88])
privacy = np.array([55, 82, 75, 60, 95])
err = np.array([3, 4, 2, 3, 3])

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

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

ax.bar(x - width, speed, width, yerr=err, label='Speed Score',
       color='#F5276C', edgecolor='white', linewidth=1.5, capsize=4,
       error_kw={'ecolor': '#374151', 'elinewidth': 1.5})
ax.bar(x, memory, width, yerr=err, label='Memory Efficiency',
       color='#27D3F5', edgecolor='white', linewidth=1.5, capsize=4,
       error_kw={'ecolor': '#374151', 'elinewidth': 1.5})
ax.bar(x + width, privacy, width, yerr=err, label='Privacy Score',
       color='#6CF527', edgecolor='white', linewidth=1.5, capsize=4,
       error_kw={'ecolor': '#374151', 'elinewidth': 1.5})

ax.set_xlabel('Browser', fontsize=12, color='#374151', fontweight='600')
ax.set_ylabel('Score', fontsize=12, color='#374151', fontweight='600')
ax.set_title('Web Browser Performance Comparison', fontsize=15, 
             color='#1f2937', fontweight='bold', pad=20)

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

Did this help you?

Support PyLucid to keep it free & growing

Support