Pie Chart
Device Usage Statistics
Light theme pie chart showing device usage breakdown with pastel colors
Output
Python
import matplotlib.pyplot as plt
import numpy as np
fig, ax = plt.subplots(figsize=(10, 6), facecolor='#ffffff')
ax.set_facecolor('#ffffff')
devices = ['Mobile', 'Desktop', 'Tablet', 'Smart TV', 'Other']
usage = [52, 30, 12, 4, 2]
colors = ['#a78bfa', '#8b5cf6', '#7c3aed', '#6d28d9', '#5b21b6']
explode = (0.05, 0, 0, 0, 0)
wedges, texts, autotexts = ax.pie(usage, labels=devices, autopct='%1.1f%%',
colors=colors, explode=explode, startangle=45,
wedgeprops={'edgecolor': 'white', 'linewidth': 2})
for text in texts:
text.set_color('#1f2937')
text.set_fontsize(10)
for autotext in autotexts:
autotext.set_color('white')
autotext.set_fontweight('bold')
ax.set_title('Device Usage Statistics', fontsize=16, fontweight='bold', color='#1f2937', pad=20)
plt.tight_layout()
Library
Matplotlib
Category
Basic Charts
More Pie Chart examples
☕