Stream Graph

Podcast Genre Listening Stream

Stream visualization of podcast listening by genre with neon aesthetic and clean legend placement.

Output
Podcast Genre Listening Stream
Python
import matplotlib.pyplot as plt
import numpy as np

COLORS = {
    'background': '#0a0a0f',
    'text': '#ffffff',
    'grid': '#333333',
}

np.random.seed(1212)
months = np.arange(0, 36)

# Podcast genres
true_crime = 25 + 0.5 * months + 5 * np.sin(months * np.pi / 6) + np.random.normal(0, 2, 36)
comedy = 30 + 0.3 * months + np.random.normal(0, 2, 36)
news = 20 + 0.4 * months + 3 * np.cos(months * np.pi / 8) + np.random.normal(0, 2, 36)
tech = 15 + 0.6 * months + np.random.normal(0, 2, 36)
health = 10 + 0.8 * months + np.random.normal(0, 1, 36)

data = [np.clip(d, 1, None) for d in [true_crime, comedy, news, tech, health]]
genre_colors = ['#F5276C', '#F5B027', '#27D3F5', '#6CF527', '#4927F5']

fig, ax = plt.subplots(figsize=(14, 6), facecolor=COLORS['background'])
ax.set_facecolor(COLORS['background'])

ax.stackplot(months, *data, colors=genre_colors, alpha=0.85, baseline='sym',
             labels=['True Crime', 'Comedy', 'News', 'Tech', 'Health'])

ax.axhline(0, color=COLORS['grid'], linewidth=0.5, alpha=0.5)
ax.set_xlim(0, 35)

ax.set_title('Podcast Listening by Genre', color=COLORS['text'], fontsize=14, fontweight='bold', pad=15)
ax.set_xlabel('Month', color=COLORS['text'], fontsize=11)
ax.set_ylabel('Hours (Millions)', color=COLORS['text'], fontsize=11)

# Legend below plot
ax.legend(loc='upper center', bbox_to_anchor=(0.5, -0.12), frameon=False, 
          labelcolor=COLORS['text'], fontsize=9, ncol=5)

for spine in ax.spines.values():
    spine.set_visible(False)
ax.tick_params(colors=COLORS['text'], labelsize=9)

plt.tight_layout()
plt.subplots_adjust(bottom=0.18)
plt.show()
Library

Matplotlib

Category

Time Series

Did this help you?

Support PyLucid to keep it free & growing

Support