Polar Chart
Renewable Energy Mix Analysis
Polar rose chart showing renewable energy source distribution and generation capacity across regions.
Output
Python
import matplotlib.pyplot as plt
import numpy as np
# Energy sources
sources = ['Solar', 'Wind', 'Hydro', 'Geothermal', 'Biomass', 'Tidal']
capacity = [35, 28, 22, 8, 5, 2] # Percentage
colors = ['#F5B027', '#27D3F5', '#276CF5', '#F54927', '#6CF527', '#4927F5']
# Angles
angles = np.linspace(0, 2 * np.pi, len(sources), endpoint=False)
width = 2 * np.pi / len(sources) * 0.75
# Light theme - Rose/Nightingale chart with sqrt scaling
fig, ax = plt.subplots(figsize=(10, 10), subplot_kw=dict(polar=True), facecolor='#ffffff')
ax.set_facecolor('#ffffff')
# Scale radii by sqrt for area perception
radii = np.sqrt(np.array(capacity) / max(capacity)) * max(capacity)
# Draw bars
bars = ax.bar(angles, radii, width=width, color=colors, alpha=0.8, edgecolor='white', linewidth=2)
# Add value labels
for angle, radius, val, color in zip(angles, radii, capacity, colors):
ax.annotate(f'{val}%', xy=(angle, radius + 3), ha='center', va='bottom',
fontsize=11, fontweight='bold', color=color)
# Styling
ax.set_ylim(0, 45)
ax.set_xticks(angles)
ax.set_xticklabels(sources, fontsize=12, color='#1f2937', fontweight='600')
ax.set_yticks([])
ax.spines['polar'].set_color('#e5e7eb')
ax.grid(color='#e5e7eb', linewidth=0.8)
ax.set_title('Renewable Energy Generation Mix', fontsize=16, color='#1f2937', fontweight='bold', pad=25)
plt.tight_layout()
plt.show()
Library
Matplotlib
Category
Part-to-Whole
☕