Radar Chart

F1 Driver Performance Analysis

Radar chart comparing Formula 1 drivers across racing skills including qualifying pace, race craft, tire management, and wet weather driving.

Output
F1 Driver Performance Analysis
Python
import matplotlib.pyplot as plt
import numpy as np

# F1 driver skills
categories = ['Qualifying Pace', 'Race Craft', 'Overtaking', 'Tire Management',
              'Wet Driving', 'Consistency', 'Team Leadership', 'Pressure Handling']
              
driver1 = [98, 90, 88, 85, 95, 92, 95, 94]  # Experienced champion
driver2 = [95, 85, 92, 80, 88, 85, 80, 88]  # Young talent
driver3 = [88, 95, 85, 92, 82, 95, 88, 90]  # Consistent performer

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

driver1 += driver1[:1]
driver2 += driver2[:1]
driver3 += driver3[:1]

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

ax.plot(angles, driver1, 'o-', linewidth=2.5, color='#C82909', label='Driver A (Champion)', markersize=7)
ax.fill(angles, driver1, alpha=0.15, color='#C82909')

ax.plot(angles, driver2, 's-', linewidth=2.5, color='#F5B027', label='Driver B (Rising Star)', markersize=7)
ax.fill(angles, driver2, alpha=0.15, color='#F5B027')

ax.plot(angles, driver3, '^-', linewidth=2.5, color='#276CF5', label='Driver C (Veteran)', markersize=7)
ax.fill(angles, driver3, alpha=0.15, color='#276CF5')

ax.set_xticks(angles[:-1])
ax.set_xticklabels(categories, fontsize=11, color='#374151', fontweight='500')
ax.set_ylim(0, 100)

ax.yaxis.grid(True, color='#e5e7eb', linestyle='-', linewidth=0.8)
ax.xaxis.grid(True, color='#d1d5db', linestyle='-', linewidth=0.5)
ax.spines['polar'].set_color('#d1d5db')

ax.set_title('F1 Driver Performance Profiles', fontsize=16, color='#1f2937',
             fontweight='bold', pad=25)

ax.legend(loc='upper right', bbox_to_anchor=(1.15, 1.1), fontsize=10,
          frameon=True, facecolor='white', edgecolor='#e5e7eb')

plt.tight_layout()
plt.show()
Library

Matplotlib

Category

Polar Charts

Did this help you?

Support PyLucid to keep it free & growing

Support