Radar Chart

Electric Vehicle Performance Analysis

Dark-themed radar chart comparing electric vehicles across range, acceleration, charging speed, price value, and autonomous features.

Output
Electric Vehicle Performance Analysis
Python
import matplotlib.pyplot as plt
import numpy as np

# EV metrics
categories = ['Range', 'Acceleration', 'Charging Speed', 'Price Value',
              'Autopilot', 'Interior Quality', 'Cargo Space', 'Reliability']
              
tesla_s = [92, 98, 90, 70, 95, 85, 75, 75]
lucid = [95, 90, 85, 60, 80, 95, 70, 70]
rivian = [75, 85, 80, 75, 75, 88, 95, 78]
ioniq = [80, 75, 95, 90, 70, 82, 80, 88]

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

tesla_s += tesla_s[:1]
lucid += lucid[:1]
rivian += rivian[:1]
ioniq += ioniq[:1]

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

ax.plot(angles, tesla_s, 'o-', linewidth=2.5, color='#C82909', label='Tesla Model S', markersize=7)
ax.fill(angles, tesla_s, alpha=0.2, color='#C82909')

ax.plot(angles, lucid, 's-', linewidth=2.5, color='#27D3F5', label='Lucid Air', markersize=7)
ax.fill(angles, lucid, alpha=0.2, color='#27D3F5')

ax.plot(angles, rivian, '^-', linewidth=2.5, color='#6CF527', label='Rivian R1T', markersize=7)
ax.fill(angles, rivian, alpha=0.2, color='#6CF527')

ax.plot(angles, ioniq, 'D-', linewidth=2.5, color='#F5B027', label='Hyundai Ioniq 6', markersize=7)
ax.fill(angles, ioniq, alpha=0.2, color='#F5B027')

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

ax.yaxis.grid(True, color='#1e293b', linestyle='-', linewidth=0.8)
ax.xaxis.grid(True, color='#334155', linestyle='-', linewidth=0.5)
ax.spines['polar'].set_color('#334155')
ax.tick_params(axis='y', colors='#94a3b8')

ax.set_title('Electric Vehicle Comparison', fontsize=16, color='#f8fafc',
             fontweight='bold', pad=25)

ax.legend(loc='upper right', bbox_to_anchor=(1.2, 1.1), fontsize=10,
          frameon=True, facecolor='#1e293b', edgecolor='#334155', labelcolor='#e2e8f0')

plt.tight_layout()
plt.show()
Library

Matplotlib

Category

Polar Charts

Did this help you?

Support PyLucid to keep it free & growing

Support