Created
March 14, 2022 22:13
-
-
Save manuelinfosec/42c8f26aea2c6780be26c7fc1a9eb122 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# import the essential libraries | |
from matplotlib import pyplot as plt | |
# create the data | |
subjects = ["Mathematics", "Integrated Science", "Business Studies", "Computer Application"] | |
scores = [85, 62, 57, 92] | |
# Plot the pie plot | |
plt.pie(scores, | |
labels=subjects, | |
colors=['r','g','b','y'], | |
startangle=90, | |
shadow=True, | |
explode=(0,0.1,0,0), | |
autopct='%1.11f%%') | |
# Add title to plot | |
plt.title("Student Performance") | |
# Draw the chart | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment