Bar Chart

Funnel Visualization

Centered decreasing bars showing funnel stages.

Output
Funnel Visualization
Python
import matplotlib.pyplot as plt
import numpy as np

COLORS = {
    'gradient': ['#6366F1', '#818CF8', '#A5B4FC', '#C7D2FE', '#E0E7FF'],
    'background': '#FFFFFF',
    'text': '#1E293B',
    'text_muted': '#64748B',
}

stages = ['Visitors', 'Leads', 'Qualified', 'Proposals', 'Sales']
values = [10000, 4500, 2000, 800, 350]
widths = [v / max(values) * 100 for v in values]

fig, ax = plt.subplots(figsize=(10, 6), dpi=100)
ax.set_facecolor(COLORS['background'])
fig.patch.set_facecolor(COLORS['background'])

y = np.arange(len(stages))[::-1]

for i, (stage, val, width, color) in enumerate(zip(stages, values, widths, COLORS['gradient'])):
    left = (100 - width) / 2
    ax.barh(y[i], width, left=left, height=0.7, color=color, alpha=0.85,
            edgecolor='white', linewidth=2)
    ax.text(50, y[i], f'{stage}\n{val:,}', ha='center', va='center',
            fontsize=10, fontweight='bold', color=COLORS['text'] if i > 2 else 'white')

ax.set_xlim(0, 100)
ax.axis('off')

plt.tight_layout()
plt.show()
Library

Matplotlib

Category

Basic Charts

Did this help you?

Support PyLucid to keep it free & growing

Support