Pie Chart

Online Learning Subjects

Light theme pie showing popular online course categories

Output
Online Learning Subjects
Python
import matplotlib.pyplot as plt
import numpy as np

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

subjects = ['Programming', 'Business', 'Design', 'Marketing', 'Data Science', 'Languages']
enrollments = [30, 20, 15, 14, 12, 9]
colors = ['#0d9488', '#14b8a6', '#2dd4bf', '#5eead4', '#99f6e4', '#ccfbf1']

wedges, texts, autotexts = ax.pie(enrollments, labels=subjects, autopct='%1.0f%%',
                                   colors=colors, 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('#134e4a')
    autotext.set_fontweight('bold')

ax.set_title('Online Learning Subject Popularity', 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