Bubble Chart

Tech Giants Market Analysis

Technology companies analyzed by revenue, profit margin, and market capitalization with neon glow effect.

Output
Tech Giants Market Analysis
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')

companies = ['Apple', 'Microsoft', 'Google', 'Amazon', 'Meta', 'Tesla', 'Netflix', 'Adobe']
revenue = np.array([394, 211, 307, 574, 134, 96, 33, 19])
profit_margin = np.array([25, 36, 26, 4, 20, 15, 18, 35])
employees = np.array([164, 221, 190, 1540, 86, 128, 13, 29])

colors = ['#F5276C', '#27D3F5', '#6CF527', '#F5B027', '#4927F5', '#F54927', '#27F5B0', '#F527B0']
sizes = employees * 3

# Glow layers
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, profit_margin, s=sizes*glow_mult, c=colors, alpha=glow_alpha, edgecolors='none')

ax.scatter(revenue, profit_margin, s=sizes, c=colors, alpha=0.9, edgecolors='none')
ax.scatter(revenue, profit_margin, s=sizes*0.4, c=colors, alpha=0.4, edgecolors='none')

# Specular highlight
ax.scatter(revenue - np.sqrt(sizes)*0.5, profit_margin + np.sqrt(sizes)*0.08, 
           s=sizes*0.15, c='white', alpha=0.5, edgecolors='none')

for i, company in enumerate(companies):
    offset_y = np.sqrt(sizes[i])/2 + 15
    ax.annotate(company, (revenue[i], profit_margin[i]), fontsize=12, color='white',
                ha='center', va='bottom', xytext=(0, offset_y), textcoords='offset points', fontweight='bold')

ax.text(0.0, 1.08, 'Tech Giants Analysis', transform=ax.transAxes, fontsize=24, color='white', fontweight='bold')
ax.text(0.0, 1.02, 'Revenue vs Profit Margin · Bubble size = Employees', transform=ax.transAxes, fontsize=11, color='#555555')

ax.set_xlabel('Revenue (Billion $)', fontsize=14, color='#888888', fontweight='500', labelpad=15)
ax.set_ylabel('Profit Margin (%)', fontsize=14, color='#888888', fontweight='500', labelpad=15)
ax.tick_params(colors='#555555', labelsize=11, length=0)
ax.set_xlim(-40, 680)
ax.set_ylim(-5, 45)

for y in [0, 10, 20, 30, 40]:
    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

Did this help you?

Support PyLucid to keep it free & growing

Support