The title pie is not at the top of the figure. Here is my code:
data = [0.4,0.3,0.1,0.2]
labels = ['Music','Dance','Program','Math']
explode = [0, 0.2, 0, 0]
colors=['#9999ff','#ff9999','#7777aa','#2442aa','#dd5555']
plt.axes(aspect='equal')
plt.pie(x=data,
labels=labels,
explode=explode,
colors=colors,
autopct='%.1f%%',
pctdistance=0.6,
labeldistance = 1.1,
radius = 2,
wedgeprops = {'linewidth': 2, 'edgecolor':'pink'},
textprops = {'fontsize':19 ,'color':'k'},
center = (0.2,0.2))
plt.title('pie')
plt.show()
Picture by the code pie