Cara Menambahkan Persentase dalam Bagan Pie di Python
# you can add percentage in matplotlib pie chart by using autopct parameter
data = [value1, value2, value3, ...]
labels = ['label1', 'label2', 'label3', ...]
#define Seaborn color palette to use
colors = sns.color_palette('pastel')[0:5]
#create pie chart
plt.pie(data, labels = labels, colors = colors, autopct='%.0f%%')
# ↑_ add this parameter for %
plt.show()
Darkstar