patches = []
for i in groups:
    ang = np.deg2rad((wedges[i[-1]].theta2 + wedges[i[0]].theta1) / 2)
for j in i:
    we = wedges[j]
center = radfraction * we.r * np.cos(ang), radfraction * we.r * np.sin(ang)
patches.append(mpatches.Wedge(center, we.r, we.theta1, we.theta2))
colors = np.linspace(0, 1, len(patches))
collection = PatchCollection(patches, cmap=plt.cm.hsv)
collection.set_array(np.array(colors))
ax[1].add_collection(collection)
ax[1].autoscale(True)
Explode multiple slices of pie together in matplotlib