Pie Chart

Payment Methods

Dark theme donut showing payment method preferences

Output
Payment Methods
Python
import matplotlib.pyplot as plt
import numpy as np

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

methods = ['Credit Card', 'Debit Card', 'Digital Wallet', 'Bank Transfer', 'Cash', 'Crypto']
usage = [32, 25, 22, 10, 8, 3]
colors = ['#3b82f6', '#6366f1', '#8b5cf6', '#a855f7', '#d946ef', '#ec4899']

wedges, texts, autotexts = ax.pie(usage, labels=methods, autopct='%1.0f%%',
                                   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('Payment Method Preferences', 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