Home > Blockchain >  Pandas DataFrame plot, colors are not unique
Pandas DataFrame plot, colors are not unique

Time:01-26

According to Pandas enter image description here

Update :

It might be hard to find a palette of very distinct 24 colors. However, you can use one of the palettes available in seaborn :

enter image description here

import seaborn as sns #pip install seaborn

list_colors = sns.color_palette("hsv", n_colors=24)

df.plot(kind="bar", stacked=True, figsize=(20, 10), color=list_colors)
  • Related