Как сделать подсюжеты в круговой диаграмме пончика в matplotlib pyhon?
Ниже код, который я написал,
import matplotlib.pyplot as plt
labels = 'Frogs', 'Hogs', 'Dogs'
sizes = [15, 30, 45]
colors = ['yellowgreen', 'gold', 'lightskyblue']
explode = (0, 0, 0) # explode a slice if required
subgroup_names = ['A.1', 'A.2', 'A.3', 'B.1', 'B.2', 'C.1']
subgroup_size = [13, 3, 5, 6, 5, 10]
a, b, c = [plt.cm.Blues, plt.cm.Reds, plt.cm.Greens]
plt.pie(sizes, explode=explode, labels=labels, pctdistance=0.45, labeldistance=0.65, colors=colors, autopct='%.2f%%', shadow=True)
centre_circle = plt.Circle((0, 0), 0.175, color='black', fc='white', linewidth=1.25)
plt.pie(subgroup_size, labels=subgroup_names, pctdistance=0.85, labeldistance=1.25, colors=[a(0.5), a(0.4), a(0.3), b(0.5), b(0.4), c(0.6)], autopct='%.2f%%', shadow=True)
centre_circle2 = plt.Circle((0, 0), 0.275, color='red', fc='white', linewidth=1.25)
fig = plt.gcf()
fig.gca().add_artist(centre_circle)
fig.gca().add_artist(centre_circle2)
plt.axis('equal')
plt.show()
Результат показывает как на картинке ниже,

Но я надеюсь, что результат, как показано на рисунке ниже (должны отображать процентное значение). Я надеюсь, что это результат (с процентным значением):
