Last active
May 23, 2019 15:01
-
-
Save pjastr/f1dd3dfcccf64510bba779014c101e2f 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 matplotlib.pyplot as plt | |
import pandas as pd | |
data = pd.read_csv("kolej.csv", sep=";", index_col=1) | |
data2 = data.iloc[1:, 1] | |
data3 = data2.sort_values(ascending=False) | |
labels = data3.index | |
sizes = data3 | |
explode = (0.1, 0.1, 0.1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) | |
fig1, ax1 = plt.subplots() | |
ax1.pie(sizes, explode=explode, labels=labels, autopct='%1.1f%%', | |
shadow=True, startangle=90) | |
ax1.axis('equal') # Equal aspect ratio ensures that pie is drawn as a circle. | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment