https://medium.com/@kvnamipara/a-better-visualisation-of-pie-charts-by-matplotlib-935b7667d77f
https://stackoverflow.com/questions/35488666/matplotlib-pandas-pie-chart-label-mistakes
matplotlib percent label position in pie chart
径向标注
https://stackoverflow.com/questions/52020474/matplotlib-pie-chart-how-to-center-label
import matplotlib.pyplot as plt
figure = plt.figure()
figure.patch.set_facecolor("None")
figure.subplots_adjust(left=0.08, bottom=0.10, right=0.99, top=0.97)
figure.clf()
axes = figure.add_subplot(111)
axes.set_aspect(1)
y = [1,2,3, 4,8,16,32]
label = ['1.52%', '3.03%', '4.55%', '6.06%', '12.12%', '24.24%', '48.48%']
axes.pie(
y, labels=label, labeldistance=0.6, rotatelabels =True,
textprops = dict(rotation_mode = 'anchor', va='center', ha='left'),
)
plt.show()
https://stackoverflow.com/questions/54441737/labels-alignmnet-pie-chart-matplotlib-2-1-0
https://stackoverflow.com/questions/50235752/matplot-pie-rotate-labels-horizontally
https://stackoverflow.com/questions/53236994/labels-placing-in-pie-chart
网友评论