Horizon Chart
Solar Irradiance Horizon
Solar panel irradiance levels throughout the day with warm orange gradient bands.
Output
Python
import matplotlib.pyplot as plt
import numpy as np
COLORS = {
'bands': ['#FFEDD5', '#FDBA74', '#F97316', '#EA580C'],
'background': '#ffffff',
'text': '#1f2937',
'grid': '#e5e7eb',
}
np.random.seed(555)
hours = np.linspace(0, 24, 288) # 5-minute intervals
# Solar curve (bell curve centered at noon)
irradiance = 1000 * np.exp(-((hours - 12)**2) / 20)
irradiance = irradiance * (1 + np.random.normal(0, 0.1, len(hours))) # Cloud variation
irradiance = np.clip(irradiance, 0, 1100)
irradiance_norm = irradiance / 1100
fig, ax = plt.subplots(figsize=(14, 3), facecolor=COLORS['background'])
ax.set_facecolor(COLORS['background'])
band = 0.25
ax.fill_between(hours, 0, np.clip(irradiance_norm, 0, band), color=COLORS['bands'][0])
ax.fill_between(hours, 0, np.clip(irradiance_norm - band, 0, band), color=COLORS['bands'][1])
ax.fill_between(hours, 0, np.clip(irradiance_norm - 2*band, 0, band), color=COLORS['bands'][2])
ax.fill_between(hours, 0, np.clip(irradiance_norm - 3*band, 0, band), color=COLORS['bands'][3])
ax.set_xlim(0, 24)
ax.set_ylim(0, 0.3)
ax.set_title('Solar Irradiance (W/m²)', color=COLORS['text'], fontsize=12, fontweight='bold', pad=10)
ax.set_xlabel('Hour of Day', color=COLORS['text'], fontsize=10)
ax.set_ylabel('Irradiance', color=COLORS['text'], fontsize=10)
ax.set_xticks([0, 6, 12, 18, 24])
ax.set_xticklabels(['00:00', '06:00', '12:00', '18:00', '24:00'])
for spine in ax.spines.values():
spine.set_color(COLORS['grid'])
ax.tick_params(colors=COLORS['text'], labelsize=9)
plt.tight_layout()
plt.show()
Library
Matplotlib
Category
Time Series
More Horizon Chart examples
☕