Bubble Chart

Clean Energy Projects Bubble

Renewable energy installations by capacity, efficiency, and investment.

Output
Clean Energy Projects Bubble
Python
import matplotlib.pyplot as plt
import numpy as np

np.random.seed(42)

fig, ax = plt.subplots(figsize=(14, 9), facecolor='#0a0a0f')
ax.set_facecolor('#0a0a0f')

projects = ['Solar CN', 'Wind EU', 'Hydro BR', 'Nuclear FR', 'Solar US', 'Wind US', 'Geo IS', 'Tidal UK']
capacity = np.array([350, 30, 110, 61, 140, 145, 0.9, 0.5])
efficiency = np.array([22, 45, 90, 92, 23, 38, 85, 25])
investment = np.array([85, 45, 25, 55, 65, 35, 2, 3])

colors = ['#F5D327', '#27D3F5', '#276CF5', '#F5276C', '#F5B027', '#6CF527', '#F54927', '#4927F5']
sizes = investment * 18

for glow_mult, glow_alpha in [(3.5, 0.02), (2.8, 0.04), (2.2, 0.06), (1.7, 0.10), (1.3, 0.15)]:
    ax.scatter(capacity, efficiency, s=sizes*glow_mult, c=colors, alpha=glow_alpha, edgecolors='none')

ax.scatter(capacity, efficiency, s=sizes, c=colors, alpha=0.9, edgecolors='none')
ax.scatter(capacity, efficiency, s=sizes*0.4, c=colors, alpha=0.4, edgecolors='none')
ax.scatter(capacity - np.sqrt(sizes)*0.3, efficiency + np.sqrt(sizes)*0.12, s=sizes*0.15, c='white', alpha=0.5, edgecolors='none')

for i, project in enumerate(projects):
    offset_y = np.sqrt(sizes[i])/2 + 10
    ax.annotate(project, (capacity[i], efficiency[i]), fontsize=10, color='white',
                ha='center', va='bottom', xytext=(0, offset_y), textcoords='offset points', fontweight='bold')

ax.text(0.0, 1.08, 'Clean Energy Projects', transform=ax.transAxes, fontsize=24, color='white', fontweight='bold')
ax.text(0.0, 1.02, 'Capacity vs Efficiency · Bubble size = Investment', transform=ax.transAxes, fontsize=11, color='#555555')

ax.set_xlabel('Installed Capacity (GW)', fontsize=14, color='#888888', fontweight='500', labelpad=15)
ax.set_ylabel('Capacity Factor (%)', fontsize=14, color='#888888', fontweight='500', labelpad=15)
ax.tick_params(colors='#555555', labelsize=11, length=0)

for y in [0, 20, 40, 60, 80, 100]:
    ax.axhline(y=y, color='#1a1a2e', linewidth=0.8, zorder=0)
for spine in ax.spines.values():
    spine.set_visible(False)

plt.tight_layout()
plt.show()
Library

Matplotlib

Category

Pairwise Data

Did this help you?

Support PyLucid to keep it free & growing

Support