import matplotlib.pyplot as plt
import numpy as np
plt.title("Score analysis:")
size = ["60", "40", "43", "20", "45"]
labels = ["Maths", "Hindi", "English", "Social", "Science"]
plt.pie(size, labels = labels, autopct="%.2f%%")
plt.show()
I know that "autopct" displays the percentage of a given value as well as shift decimals. But how it gets to know how much area is to be covered in the pie chart for any label , say "Math" , what's the calculation behind it?