Horizon Chart
Factory Production Rate Horizon
Manufacturing output horizon chart showing production rate variations with teal gradient.
Output
Python
import matplotlib.pyplot as plt
import numpy as np
COLORS = {
'bands': ['#CCFBF1', '#5EEAD4', '#14B8A6', '#0D9488'],
'background': '#ffffff',
'text': '#1f2937',
'grid': '#e5e7eb',
}
np.random.seed(999)
hours = np.arange(0, 168) # Week
# Production: 3 shifts, weekday pattern
shift_pattern = 80 + 15 * np.cos(hours * np.pi / 4) # 8-hour shifts
weekend_factor = np.where((hours % 168 > 120), 0.3, 1.0) # Reduced on weekends
production = shift_pattern * weekend_factor + np.random.normal(0, 5, len(hours))
production = np.clip(production, 0, 100)
production_norm = production / 100
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(production_norm, 0, band), color=COLORS['bands'][0])
ax.fill_between(hours, 0, np.clip(production_norm - band, 0, band), color=COLORS['bands'][1])
ax.fill_between(hours, 0, np.clip(production_norm - 2*band, 0, band), color=COLORS['bands'][2])
ax.fill_between(hours, 0, np.clip(production_norm - 3*band, 0, band), color=COLORS['bands'][3])
ax.set_xlim(0, 167)
ax.set_ylim(0, 0.3)
ax.set_title('Factory Production Rate (units/hour)', color=COLORS['text'], fontsize=12, fontweight='bold', pad=10)
ax.set_xlabel('Day', color=COLORS['text'], fontsize=10)
ax.set_ylabel('Output', color=COLORS['text'], fontsize=10)
ax.set_xticks([0, 24, 48, 72, 96, 120, 144])
ax.set_xticklabels(['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'])
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
☕