I would like to know I can I add callouts in a pie chart. I have this dataset:
ID Colour
0 27995 red
1 36185 orange
2 57204 blue
3 46009 red
4 36241 white
5 63286 blue
6 68905 blue
7 3798 green
8 53861 yellow
...
199 193 brown
and when I try to generate a pie chart using pandas:
df.groupby(Colour).size().plot(kind='pie',figsize=(15,15), label="", labeldistance=0.8, autopct='%1.0f%%', pctdistance=0.5,legend=True)
I get an awful chart where colours overlap since slices are very tiny and percentage values overlap too. I know that it could be easier to manage the chart as follows:
How to avoid overlapping of labels & autopct in a matplotlib pie chart?
but I have not been able to use the code in the answer in my case.
Can you please tell me what I should change in the code suggested in that answer?