fracs = [15, 30, 45, 10]
total = sum(fracs)
explode = 0, 0.05, 0, 0
pie(fracs, explode=explode, labels=labels, autopct=lambda p: '{:.0f}'.
    format(p * total / 100), shadow=True, startangle=90)
show()
Matplotlib pie-chart: How to replace auto-labelled relative values by absolute values