Bubble Chart
Cryptocurrency Market Bubble
Top cryptocurrencies analyzed by volatility, trading volume, and market cap with glowing bubbles.
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')
cryptos = ['BTC', 'ETH', 'BNB', 'SOL', 'XRP', 'ADA', 'DOGE', 'AVAX']
volatility = np.array([3.2, 4.5, 3.8, 6.2, 4.1, 5.5, 8.2, 5.8])
volume = np.array([28, 15, 2.5, 3.8, 2.2, 0.8, 1.5, 0.9])
market_cap = np.array([850, 380, 85, 60, 35, 18, 22, 14])
colors = ['#F5B027', '#6CF527', '#F5D327', '#27D3F5', '#276CF5', '#4927F5', '#F54927', '#F5276C']
sizes = market_cap * 3
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(volatility, volume, s=sizes*glow_mult, c=colors, alpha=glow_alpha, edgecolors='none')
ax.scatter(volatility, volume, s=sizes, c=colors, alpha=0.9, edgecolors='none')
ax.scatter(volatility, volume, s=sizes*0.4, c=colors, alpha=0.4, edgecolors='none')
ax.scatter(volatility - np.sqrt(sizes)*0.008, volume + np.sqrt(sizes)*0.015, s=sizes*0.15, c='white', alpha=0.5, edgecolors='none')
for i, crypto in enumerate(cryptos):
offset_y = np.sqrt(sizes[i])/2 + 10
ax.annotate(crypto, (volatility[i], volume[i]), fontsize=13, color='white',
ha='center', va='bottom', xytext=(0, offset_y), textcoords='offset points', fontweight='bold')
ax.text(0.0, 1.08, 'Cryptocurrency Market', transform=ax.transAxes, fontsize=24, color='white', fontweight='bold')
ax.text(0.0, 1.02, 'Volatility vs Volume · Bubble size = Market Cap', transform=ax.transAxes, fontsize=11, color='#555555')
ax.set_xlabel('30-Day Volatility (%)', fontsize=14, color='#888888', fontweight='500', labelpad=15)
ax.set_ylabel('24h Volume (Billion $)', fontsize=14, color='#888888', fontweight='500', labelpad=15)
ax.tick_params(colors='#555555', labelsize=11, length=0)
for y in [0, 5, 10, 15, 20, 25, 30]:
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
☕