Pie Chart

Workout Distribution

Light theme pie chart showing weekly workout activity types

Output
Workout Distribution
Python
import matplotlib.pyplot as plt
import numpy as np

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

workouts = ['Cardio', 'Strength', 'Yoga', 'HIIT', 'Rest']
hours = [25, 30, 15, 20, 10]
colors = ['#f472b6', '#e879f9', '#c084fc', '#a78bfa', '#818cf8']
explode = (0, 0.05, 0, 0, 0)

wedges, texts, autotexts = ax.pie(hours, labels=workouts, autopct='%1.0f%%',
                                   colors=colors, explode=explode, startangle=90,
                                   wedgeprops={'edgecolor': 'white', 'linewidth': 2})

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

ax.set_title('Weekly Workout Distribution', fontsize=16, fontweight='bold', color='#1f2937', pad=20)
plt.tight_layout()
Library

Matplotlib

Category

Basic Charts

Did this help you?

Support PyLucid to keep it free & growing

Support