Bubble Chart
Sports Franchises Value Bubble
Top sports teams analyzed by revenue, wins, and valuation.
Output
Python
import matplotlib.pyplot as plt
import numpy as np
np.random.seed(42)
fig, ax = plt.subplots(figsize=(14, 9), facecolor='#0a0a0f')
ax.set_facecolor('#0a0a0f')
teams = ['Cowboys', 'Real Madrid', 'Yankees', 'Lakers', 'Man United', 'Warriors', 'Patriots', 'Barcelona']
revenue = np.array([1100, 850, 680, 580, 780, 520, 600, 800])
wins = np.array([42, 185, 410, 220, 95, 280, 55, 165])
valuation = np.array([9.0, 6.1, 7.1, 6.4, 6.0, 7.7, 6.4, 5.5])
colors = ['#276CF5', '#F5B027', '#27D3F5', '#4927F5', '#F54927', '#F5D327', '#C82909', '#F5276C']
sizes = valuation * 120
for glow_mult, glow_alpha in [(3.5, 0.02), (2.8, 0.04), (2.2, 0.06), (1.7, 0.10), (1.3, 0.15)]:
ax.scatter(revenue, wins, s=sizes*glow_mult, c=colors, alpha=glow_alpha, edgecolors='none')
ax.scatter(revenue, wins, s=sizes, c=colors, alpha=0.9, edgecolors='none')
ax.scatter(revenue, wins, s=sizes*0.4, c=colors, alpha=0.4, edgecolors='none')
ax.scatter(revenue - np.sqrt(sizes)*0.8, wins + np.sqrt(sizes)*0.35, s=sizes*0.15, c='white', alpha=0.5, edgecolors='none')
for i, team in enumerate(teams):
offset_y = np.sqrt(sizes[i])/2 + 10
ax.annotate(team, (revenue[i], wins[i]), fontsize=10, color='white',
ha='center', va='bottom', xytext=(0, offset_y), textcoords='offset points', fontweight='bold')
ax.text(0.0, 1.08, 'Sports Franchise Values', transform=ax.transAxes, fontsize=24, color='white', fontweight='bold')
ax.text(0.0, 1.02, 'Revenue vs Wins · Bubble size = Valuation', transform=ax.transAxes, fontsize=11, color='#555555')
ax.set_xlabel('Annual Revenue (Million $)', fontsize=14, color='#888888', fontweight='500', labelpad=15)
ax.set_ylabel('Wins (Last 5 Seasons)', fontsize=14, color='#888888', fontweight='500', labelpad=15)
ax.tick_params(colors='#555555', labelsize=11, length=0)
for y in [0, 100, 200, 300, 400, 500]:
ax.axhline(y=y, color='#1a1a2e', linewidth=0.8, zorder=0)
for spine in ax.spines.values():
spine.set_visible(False)
plt.tight_layout()
plt.show()
Library
Matplotlib
Category
Pairwise Data
More Bubble Chart examples
☕