3D Scatter

Wind Turbine Performance Analysis

Renewable energy analysis showing wind turbine output vs wind speed and air density.

Output
Wind Turbine Performance Analysis
Python
import matplotlib.pyplot as plt
import numpy as np

np.random.seed(321)

# Wind turbine performance data
n_samples = 180

wind_speed = np.random.uniform(3, 25, n_samples)  # m/s
air_density = np.random.uniform(1.1, 1.3, n_samples)  # kg/m³
power_output = 0.5 * air_density * np.pi * 50**2 * wind_speed**3 / 1e6  # MW (simplified)
power_output *= np.random.uniform(0.3, 0.5, n_samples)  # Efficiency factor
power_output = np.clip(power_output, 0, 5)  # Rated capacity

# Color by efficiency
efficiency = power_output / (wind_speed / 10)
efficiency_norm = (efficiency - efficiency.min()) / (efficiency.max() - efficiency.min())

fig = plt.figure(figsize=(10, 8), facecolor='#ffffff')
ax = fig.add_subplot(111, projection='3d', facecolor='#ffffff')

# Custom colormap from coral to cyan
colors = []
for e in efficiency_norm:
    r = int(245 - e * 206)
    g = int(39 + e * 172)
    b = int(108 + e * 137)
    colors.append(f'#{r:02x}{g:02x}{b:02x}')

ax.scatter(wind_speed, air_density, power_output, c=colors, s=60, 
           alpha=0.7, edgecolors='#374151', linewidths=0.3)

ax.set_xlabel('Wind Speed (m/s)', color='#1f2937', fontsize=10)
ax.set_ylabel('Air Density (kg/m³)', color='#1f2937', fontsize=10)
ax.set_zlabel('Power Output (MW)', color='#1f2937', fontsize=10)
ax.set_title('Wind Turbine Performance Analysis', color='#1f2937', fontsize=14, fontweight='bold', pad=20)

ax.tick_params(colors='#6b7280', labelsize=8)
ax.xaxis.pane.fill = False
ax.yaxis.pane.fill = False
ax.zaxis.pane.fill = False
ax.xaxis.pane.set_edgecolor('#e5e7eb')
ax.yaxis.pane.set_edgecolor('#e5e7eb')
ax.zaxis.pane.set_edgecolor('#e5e7eb')

ax.view_init(elev=20, azim=45)
plt.tight_layout()
plt.show()
Library

Matplotlib

Category

3D Charts

Did this help you?

Support PyLucid to keep it free & growing

Support