By this piece of code I'm generating multiple plots(PIE chats) in one pdf
import matplotlib.pyplot as plt
from matplotlib.backends.backend_pdf import PdfPages
pp = PdfPages('long.pdf')
lists = [
([1, 3, 6], ["bells label", "whistles label", "pasta label"], 'title-1'),
([11, 3, 6, 5], ["red colour", "blue colour", "green colour", "back colour"], 'title-2')
]
for x_list,label_list,title in lists:
plt.figure(figsize=(2,2), dpi=100)
# plt.axes([0.1, 0.1, 0.8, 0.8])
plt.axis('equal')
explode = [0.2]
explode += [0 for x in range(len(x_list)-1)]
plt.pie(x_list, labels=label_list, explode=explode, autopct="%1.1f%%", startangle=90)
plt.title(title)
plt.savefig(pp, format='pdf')
# pp.savefig()
pp.close()
but I'm getting output like this, very unclear/overlapped/stripped.
How can I fix this ?
PS: I need your expertise in this library.
How can I improve this in looking/structure ?
Any suggestion would be appreciated.