I am having more then 40 items to show in my chart. I have only 10 colours that repeatedly are shown on the chart. How can I generate more colors.
plt.pie(f,la
I hope this answer would be useful. Check this link , Matplotlib supported colors. You can randomly pick 40 colors from it and use in your pie chart.
mcolors.TABLEAU_COLORS
mcolors.BASE_COLORS
mcolors.CSS4_COLORS
Sample
import random
import matplotlib.colors as mcolors
colors = random.choices(list(mcolors.CSS4_COLORS.values()),k = number_of_colors)