Pie Chart
Market Share Analysis
Modern donut chart showing tech company market shares
Output
Python
import matplotlib.pyplot as plt
import numpy as np
fig, ax = plt.subplots(figsize=(10, 8), facecolor='#0a0a0f')
ax.set_facecolor('#0a0a0f')
sizes = [35, 25, 20, 12, 8]
labels = ['Company A', 'Company B', 'Company C', 'Company D', 'Others']
colors = ['#6366f1', '#8b5cf6', '#a855f7', '#d946ef', '#ec4899']
explode = (0.02, 0.02, 0.02, 0.02, 0.02)
wedges, texts, autotexts = ax.pie(sizes, explode=explode, labels=None, colors=colors,
autopct='%1.1f%%', startangle=90,
wedgeprops={'linewidth': 2, 'edgecolor': '#0a0a0f', 'width': 0.6},
pctdistance=0.75)
for autotext in autotexts:
autotext.set_color('#ffffff')
autotext.set_fontsize(11)
autotext.set_fontweight('bold')
centre_circle = plt.Circle((0, 0), 0.40, fc='#0a0a0f')
ax.add_patch(centre_circle)
ax.legend(wedges, labels, loc='center left', bbox_to_anchor=(1, 0.5),
facecolor='#0a0a0f', edgecolor='#2a2a4a', labelcolor='#a0a0c0',
fontsize=10)
ax.set_title('Market Share Distribution', color='#e0e0ff', fontsize=14, fontweight='bold', pad=20)
plt.tight_layout()
Library
Matplotlib
Category
Basic Charts
More Pie Chart examples
☕