Bubble Chart
Music Streaming Artists
Top streaming artists by monthly plays, followers, and discography.
Output
Python
import matplotlib.pyplot as plt
import numpy as np
np.random.seed(42)
fig, ax = plt.subplots(figsize=(14, 9), facecolor='#ffffff')
ax.set_facecolor('#ffffff')
artists = ['Taylor Swift', 'Bad Bunny', 'Drake', 'The Weeknd', 'BTS', 'Ed Sheeran', 'Ariana', 'Billie']
streams = np.array([2.8, 2.5, 2.3, 2.1, 1.8, 1.9, 1.7, 1.5])
followers = np.array([92, 72, 81, 65, 75, 118, 96, 68])
albums = np.array([11, 5, 7, 5, 9, 5, 6, 3])
colors = ['#F5276C', '#F5B027', '#27D3F5', '#4927F5', '#6CF527', '#F54927', '#F527B0', '#27F5B0']
sizes = albums * 100
for glow_mult, glow_alpha in [(2.0, 0.03), (1.6, 0.05), (1.3, 0.08)]:
ax.scatter(streams, followers, s=sizes*glow_mult, c='#000000', alpha=glow_alpha, edgecolors='none')
ax.scatter(streams, followers, s=sizes, c=colors, alpha=0.85, edgecolors='white', linewidth=2)
ax.scatter(streams - np.sqrt(sizes)*0.008, followers + np.sqrt(sizes)*0.15, s=sizes*0.2, c='white', alpha=0.6, edgecolors='none')
for i, artist in enumerate(artists):
offset_y = np.sqrt(sizes[i])/2 + 10
ax.annotate(artist, (streams[i], followers[i]), fontsize=10, color='#1f2937',
ha='center', va='bottom', xytext=(0, offset_y), textcoords='offset points', fontweight='bold')
ax.text(0.0, 1.08, 'Music Streaming Artists', transform=ax.transAxes, fontsize=24, color='#1f2937', fontweight='bold')
ax.text(0.0, 1.02, 'Streams vs Followers · Bubble size = Albums', transform=ax.transAxes, fontsize=11, color='#6b7280')
ax.set_xlabel('Monthly Streams (Billions)', fontsize=14, color='#4b5563', fontweight='500', labelpad=15)
ax.set_ylabel('Followers (Millions)', fontsize=14, color='#4b5563', fontweight='500', labelpad=15)
ax.tick_params(colors='#6b7280', labelsize=11, length=0)
for y in [60, 80, 100, 120]:
ax.axhline(y=y, color='#f3f4f6', linewidth=1, 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
☕