Pie Chart
Programming Languages Popularity
Dark theme donut with inner text showing programming language market share
Output
Python
import matplotlib.pyplot as plt
import numpy as np
fig, ax = plt.subplots(figsize=(10, 6), facecolor='#0a0a0f')
ax.set_facecolor('#0a0a0f')
languages = ['Python', 'JavaScript', 'Java', 'C++', 'Go', 'Rust']
popularity = [28, 25, 18, 12, 10, 7]
colors = ['#fbbf24', '#f59e0b', '#d97706', '#b45309', '#92400e', '#78350f']
wedges, texts, autotexts = ax.pie(popularity, labels=languages, autopct='%1.1f%%',
colors=colors, startangle=90,
wedgeprops={'width': 0.55, 'edgecolor': '#0a0a0f', 'linewidth': 2})
for text in texts:
text.set_color('white')
text.set_fontsize(10)
for autotext in autotexts:
autotext.set_color('#0a0a0f')
autotext.set_fontweight('bold')
centre_circle = plt.Circle((0, 0), 0.35, fc='#0a0a0f')
ax.add_patch(centre_circle)
ax.text(0, 0, '2024\nTrends', ha='center', va='center', fontsize=14,
fontweight='bold', color='white')
ax.set_title('Programming Languages Popularity', fontsize=16, fontweight='bold', color='white', pad=20)
plt.tight_layout()
Library
Matplotlib
Category
Basic Charts
More Pie Chart examples
☕