Radar Chart

Football Player Comparison

FIFA-style player stats comparison for elite footballers.

Output
Football Player Comparison
Python
import matplotlib.pyplot as plt
import numpy as np

# Football player stats (normalized 0-100)
categories = ['Pace', 'Shooting', 'Passing', 'Dribbling', 'Defending', 'Physical']
messi = [85, 92, 91, 95, 38, 65]
ronaldo = [87, 94, 82, 88, 35, 78]
mbappe = [97, 89, 80, 92, 36, 78]

N = len(categories)
angles = np.linspace(0, 2 * np.pi, N, endpoint=False).tolist()
angles += angles[:1]

messi += messi[:1]
ronaldo += ronaldo[:1]
mbappe += mbappe[:1]

fig, ax = plt.subplots(figsize=(8, 8), subplot_kw=dict(polar=True), facecolor='#ffffff')
ax.set_facecolor('#ffffff')

ax.plot(angles, messi, 'o-', linewidth=2.5, color='#6CF527', label='Messi', markersize=7)
ax.fill(angles, messi, alpha=0.2, color='#6CF527')

ax.plot(angles, ronaldo, 's-', linewidth=2.5, color='#F5276C', label='Ronaldo', markersize=7)
ax.fill(angles, ronaldo, alpha=0.2, color='#F5276C')

ax.plot(angles, mbappe, '^-', linewidth=2.5, color='#27D3F5', label='Mbappé', markersize=7)
ax.fill(angles, mbappe, alpha=0.2, color='#27D3F5')

ax.set_xticks(angles[:-1])
ax.set_xticklabels(categories, fontsize=12, color='#374151', fontweight='600')
ax.set_ylim(0, 100)
ax.set_yticks([25, 50, 75, 100])
ax.set_yticklabels(['25', '50', '75', '100'], fontsize=9, color='#6b7280')
ax.yaxis.grid(True, color='#e5e7eb', linestyle='-', linewidth=0.8)
ax.xaxis.grid(True, color='#e5e7eb', linestyle='-', linewidth=0.8)
ax.spines['polar'].set_color('#d1d5db')

ax.legend(loc='upper right', bbox_to_anchor=(1.2, 1.1), fontsize=11,
          facecolor='#ffffff', edgecolor='#e5e7eb')
plt.title('Football Player Comparison', fontsize=16, color='#1f2937', 
          fontweight='bold', pad=20)

plt.tight_layout()
plt.show()
Library

Matplotlib

Category

Polar Charts

Did this help you?

Support PyLucid to keep it free & growing

Support