Polar Chart

Seasonal Sales Distribution

Quarterly sales pattern with gradient colors

Output
Seasonal Sales Distribution
Python
import matplotlib.pyplot as plt
import numpy as np

quarters = ['Q1', 'Q2', 'Q3', 'Q4']
years = ['2022', '2023', '2024']
data = {
    '2022': [65, 78, 82, 95],
    '2023': [72, 85, 90, 105],
    '2024': [80, 92, 98, 115]
}

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

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

colors = ['#4927F5', '#27D3F5', '#6CF527']
for year, color in zip(years, colors):
    values = data[year] + [data[year][0]]
    ax.plot(angles, values, color=color, linewidth=2.5, label=year)
    ax.fill(angles, values, color=color, alpha=0.15)

ax.set_xticks(angles[:-1])
ax.set_xticklabels(quarters, fontsize=12, color='white', fontweight='600')
ax.set_ylim(0, 130)
ax.set_yticks([30, 60, 90, 120])
ax.set_yticklabels(['30', '60', '90', '120'], fontsize=9, color='#666666')
ax.spines['polar'].set_color('#555555')
ax.grid(color='#555555', linewidth=0.8, alpha=0.7)
ax.legend(loc='upper right', bbox_to_anchor=(1.2, 1.1), fontsize=10, facecolor='#0a0a0f', edgecolor='#333333', labelcolor='white')
ax.set_title('Seasonal Sales Distribution', fontsize=16, color='white', fontweight='bold', pad=20, y=1.08)

plt.tight_layout()
plt.show()
Library

Matplotlib

Category

Part-to-Whole

Did this help you?

Support PyLucid to keep it free & growing

Support