Boxplot
Esports Reaction Time
Player reaction time distribution across gaming titles
Output
Python
import matplotlib.pyplot as plt
import numpy as np
np.random.seed(42)
games = ['CS2', 'Valorant', 'LoL', 'Dota 2', 'Fortnite']
data = [
np.random.normal(180, 25, 200),
np.random.normal(195, 30, 200),
np.random.normal(220, 35, 200),
np.random.normal(235, 40, 200),
np.random.normal(210, 28, 200)
]
fig, ax = plt.subplots(figsize=(10, 6), dpi=100)
ax.set_facecolor('#0a0a0f')
fig.patch.set_facecolor('#0a0a0f')
colors = ['#F54927', '#F5276C', '#276CF5', '#C82909', '#6CF527']
bp = ax.boxplot(data, widths=0.6, patch_artist=True, showfliers=True,
flierprops=dict(marker='s', markerfacecolor='#F5D327', markersize=3, alpha=0.5),
medianprops=dict(color='#F5D327', linewidth=2.5))
for patch, color in zip(bp['boxes'], colors):
patch.set_facecolor(color)
patch.set_alpha(0.85)
patch.set_edgecolor('white')
for i, color in enumerate(colors):
bp['whiskers'][i*2].set_color(color)
bp['whiskers'][i*2+1].set_color(color)
bp['caps'][i*2].set_color(color)
bp['caps'][i*2+1].set_color(color)
ax.axhline(200, color='#27D3F5', linewidth=1.5, linestyle='--', alpha=0.6, label='Pro Average')
ax.set_xticklabels(games)
ax.spines['top'].set_visible(False)
ax.spines['right'].set_visible(False)
ax.spines['left'].set_color('#333333')
ax.spines['bottom'].set_color('#333333')
ax.yaxis.grid(True, color='#1a1a2e', linewidth=0.5, zorder=0)
ax.set_axisbelow(True)
ax.tick_params(axis='both', colors='#888888', labelsize=9, length=0, pad=8)
ax.set_ylabel('Reaction Time (ms)', fontsize=11, color='white', fontweight='500')
ax.set_title('Esports Pro Player Reaction Times', fontsize=14, color='white', fontweight='bold', pad=15)
ax.legend(loc='upper right', facecolor='#0a0a0f', edgecolor='#333333', labelcolor='white')
plt.tight_layout()
plt.show()
Library
Matplotlib
Category
Statistical
☕