Error Bar Chart

Startup Funding by Sector

Venture capital funding comparison across tech sectors and funding stages.

Output
Startup Funding by Sector
Python
import matplotlib.pyplot as plt
import numpy as np

np.random.seed(42)

sectors = ['AI/ML', 'FinTech', 'HealthTech', 'CleanTech', 'EdTech', 'SaaS']
seed = np.array([2.5, 2.2, 1.8, 2.0, 1.5, 2.0])
series_a = np.array([15, 12, 10, 11, 8, 12])
series_b = np.array([45, 38, 32, 35, 25, 40])
seed_err = np.array([0.8, 0.6, 0.5, 0.6, 0.4, 0.5])
a_err = np.array([4, 3, 2.5, 3, 2, 3])
b_err = np.array([12, 10, 8, 9, 6, 10])

fig, ax = plt.subplots(figsize=(11, 6), facecolor='#ffffff')
ax.set_facecolor('#ffffff')

x = np.arange(len(sectors))
width = 0.25

ax.bar(x - width, seed, width, yerr=seed_err, label='Seed',
       color='#6CF527', edgecolor='white', linewidth=1.5, capsize=3,
       error_kw={'ecolor': '#374151', 'elinewidth': 1.5})
ax.bar(x, series_a, width, yerr=a_err, label='Series A',
       color='#27D3F5', edgecolor='white', linewidth=1.5, capsize=3,
       error_kw={'ecolor': '#374151', 'elinewidth': 1.5})
ax.bar(x + width, series_b, width, yerr=b_err, label='Series B',
       color='#5314E6', edgecolor='white', linewidth=1.5, capsize=3,
       error_kw={'ecolor': '#374151', 'elinewidth': 1.5})

ax.set_xlabel('Sector', fontsize=12, color='#374151', fontweight='600')
ax.set_ylabel('Average Funding ($M)', fontsize=12, color='#374151', fontweight='600')
ax.set_title('Startup Funding by Sector and Stage', fontsize=15, 
             color='#1f2937', fontweight='bold', pad=20)

ax.set_xticks(x)
ax.set_xticklabels(sectors, fontsize=11)
ax.legend(facecolor='#ffffff', edgecolor='#e5e7eb', fontsize=10)
ax.tick_params(colors='#6b7280', labelsize=10)
ax.set_ylim(0, 65)
ax.grid(True, axis='y', alpha=0.4, color='#e5e7eb')
ax.spines['top'].set_visible(False)
ax.spines['right'].set_visible(False)
ax.spines['left'].set_color('#d1d5db')
ax.spines['bottom'].set_color('#d1d5db')

plt.tight_layout()
plt.show()
Library

Matplotlib

Category

Statistical

Did this help you?

Support PyLucid to keep it free & growing

Support