Pie Chart

Sales by Region

Dark theme donut chart showing regional sales distribution with gradient colors

Output
Sales by Region
Python
import matplotlib.pyplot as plt
import numpy as np
from matplotlib.colors import LinearSegmentedColormap

fig, ax = plt.subplots(figsize=(10, 6), facecolor='#0a0a0f')
ax.set_facecolor('#0a0a0f')

regions = ['North America', 'Europe', 'Asia Pacific', 'Latin America', 'Middle East']
sales = [42, 28, 18, 8, 4]
colors = ['#06b6d4', '#0891b2', '#0e7490', '#155e75', '#164e63']

wedges, texts, autotexts = ax.pie(sales, labels=regions, autopct='%1.1f%%',
                                   colors=colors, startangle=90,
                                   wedgeprops={'width': 0.5, 'edgecolor': '#0a0a0f', 'linewidth': 2})

for text in texts:
    text.set_color('white')
    text.set_fontsize(10)
for autotext in autotexts:
    autotext.set_color('white')
    autotext.set_fontweight('bold')

ax.set_title('Sales by Region', fontsize=16, fontweight='bold', color='white', pad=20)
plt.tight_layout()
Library

Matplotlib

Category

Basic Charts

Did this help you?

Support PyLucid to keep it free & growing

Support