Pie Chart
Car Color Preferences
Light theme pie showing popular car color choices
Output
Python
import matplotlib.pyplot as plt
import numpy as np
fig, ax = plt.subplots(figsize=(10, 6), facecolor='#ffffff')
ax.set_facecolor('#ffffff')
colors_list = ['White', 'Black', 'Silver', 'Blue', 'Red', 'Gray']
popularity = [28, 22, 18, 12, 12, 8]
pie_colors = ['#f5f5f4', '#171717', '#a8a29e', '#3b82f6', '#ef4444', '#6b7280']
wedges, texts, autotexts = ax.pie(popularity, labels=colors_list, autopct='%1.0f%%',
colors=pie_colors, startangle=90,
wedgeprops={'edgecolor': '#1f2937', 'linewidth': 2})
for i, text in enumerate(texts):
text.set_color('#1f2937')
text.set_fontsize(10)
for i, autotext in enumerate(autotexts):
if i in [0, 2]: # White and Silver
autotext.set_color('#1f2937')
else:
autotext.set_color('white')
autotext.set_fontweight('bold')
ax.set_title('Car Color Preferences', fontsize=16, fontweight='bold', color='#1f2937', pad=20)
plt.tight_layout()
Library
Matplotlib
Category
Basic Charts
More Pie Chart examples
☕