3D Scatter

Athlete Performance Profile Analysis

Sports analytics comparing athlete speed, endurance, and strength by playing position.

Output
Athlete Performance Profile Analysis
Python
import matplotlib.pyplot as plt
import numpy as np

np.random.seed(741)

# Athlete performance metrics
n_athletes = 120

speed = np.random.normal(28, 3, n_athletes)  # km/h
endurance = np.random.normal(70, 15, n_athletes)  # VO2max
strength = np.random.normal(150, 30, n_athletes)  # kg

# Position classification
positions = np.random.choice(['Forward', 'Midfielder', 'Defender', 'Goalkeeper'], n_athletes)
pos_colors = {'Forward': '#F5276C', 'Midfielder': '#27D3F5', 'Defender': '#6CF527', 'Goalkeeper': '#F5B027'}
colors = [pos_colors[p] for p in positions]

fig = plt.figure(figsize=(10, 8), facecolor='#ffffff')
ax = fig.add_subplot(111, projection='3d', facecolor='#ffffff')

ax.scatter(speed, endurance, strength, c=colors, s=60, 
           alpha=0.7, edgecolors='#374151', linewidths=0.3)

ax.set_xlabel('Speed (km/h)', color='#1f2937', fontsize=10)
ax.set_ylabel('Endurance (VO₂max)', color='#1f2937', fontsize=10)
ax.set_zlabel('Strength (kg)', color='#1f2937', fontsize=10)
ax.set_title('Athlete Performance Profile Analysis', color='#1f2937', fontsize=14, fontweight='bold', pad=20)

ax.tick_params(colors='#6b7280', labelsize=8)
ax.xaxis.pane.fill = False
ax.yaxis.pane.fill = False
ax.zaxis.pane.fill = False
ax.xaxis.pane.set_edgecolor('#e5e7eb')
ax.yaxis.pane.set_edgecolor('#e5e7eb')
ax.zaxis.pane.set_edgecolor('#e5e7eb')

ax.view_init(elev=20, azim=45)
plt.tight_layout()
plt.show()
Library

Matplotlib

Category

3D Charts

Did this help you?

Support PyLucid to keep it free & growing

Support