Horizon Chart
Podcast Listening Hours Horizon
Media consumption horizon chart showing podcast listening patterns with deep purple neon gradient.
Output
Python
import matplotlib.pyplot as plt
import numpy as np
COLORS = {
'bands': ['#2d1b4e', '#4c2882', '#8B5CF6', '#C4B5FD'],
'background': '#0a0a0f',
'text': '#ffffff',
}
np.random.seed(3232)
hours = np.arange(0, 168) # Week
# Podcast: commute times, workout mornings
commute_am = 30 * np.exp(-((hours % 24 - 7.5)**2) / 2)
commute_pm = 25 * np.exp(-((hours % 24 - 17.5)**2) / 2)
weekend_morning = np.where((hours % 168 > 120), 20 * np.exp(-((hours % 24 - 9)**2) / 8), 0)
listening = commute_am + commute_pm + weekend_morning + np.random.exponential(3, len(hours))
listening = np.clip(listening, 0, 50)
listening_norm = listening / 50
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(listening_norm, 0, band), color=COLORS['bands'][0])
ax.fill_between(hours, 0, np.clip(listening_norm - band, 0, band), color=COLORS['bands'][1])
ax.fill_between(hours, 0, np.clip(listening_norm - 2*band, 0, band), color=COLORS['bands'][2])
ax.fill_between(hours, 0, np.clip(listening_norm - 3*band, 0, band), color=COLORS['bands'][3])
ax.set_xlim(0, 167)
ax.set_ylim(0, 0.3)
ax.set_title('Podcast Listening (minutes/hour)', color=COLORS['text'], fontsize=12, fontweight='bold', pad=10)
ax.set_xlabel('Day', color=COLORS['text'], fontsize=10)
ax.set_ylabel('Minutes/hr', 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_visible(False)
ax.tick_params(colors=COLORS['text'], labelsize=9)
plt.tight_layout()
plt.show()
Library
Matplotlib
Category
Time Series
More Horizon Chart examples
☕