Radar Chart

RPG Character Class Comparison

Role-playing game character class stats visualization.

Output
RPG Character Class Comparison
Python
import matplotlib.pyplot as plt
import numpy as np

# RPG character stats
categories = ['Strength', 'Agility', 'Intelligence', 'Vitality', 'Luck', 'Charisma']
warrior = [95, 60, 40, 85, 50, 55]
mage = [30, 55, 98, 50, 65, 70]
rogue = [55, 95, 65, 45, 85, 75]

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

warrior += warrior[:1]
mage += mage[:1]
rogue += rogue[:1]

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

ax.plot(angles, warrior, 'o-', linewidth=3, color='#C82909', label='Warrior', markersize=8)
ax.fill(angles, warrior, alpha=0.25, color='#C82909')

ax.plot(angles, mage, 's-', linewidth=3, color='#5314E6', label='Mage', markersize=8)
ax.fill(angles, mage, alpha=0.25, color='#5314E6')

ax.plot(angles, rogue, '^-', linewidth=3, color='#6CF527', label='Rogue', markersize=8)
ax.fill(angles, rogue, alpha=0.25, color='#6CF527')

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.legend(loc='upper right', bbox_to_anchor=(1.2, 1.1), fontsize=11,
          facecolor='#ffffff', edgecolor='#e5e7eb')
plt.title('RPG Character Class 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