How to avoid overlapping of labels & autopct in a pie chart
Alternatively you can put the legends beside the pie graph: import matplotlib.pyplot as plt import numpy as np x = np.char.array([‘Jan’,’Feb’,’Mar’,’Apr’,’May’,’Jun’,’Jul’,’Aug’,’Sep’,’Oct’, ‘Nov’,’Dec’]) y = np.array([234, 64, 54,10, 0, 1, 0, 9, 2, 1, 7, 7]) colors = [‘yellowgreen’,’red’,’gold’,’lightskyblue’,’white’,’lightcoral’,’blue’,’pink’, ‘darkgreen’,’yellow’,’grey’,’violet’,’magenta’,’cyan’] porcent = 100.*y/y.sum() patches, texts = plt.pie(y, colors=colors, startangle=90, radius=1.2) labels = [‘{0} – {1:1.2f} %’.format(i,j) … Read more