I need to create a stacked bar chart with a large number (10 or so) categories. The problem is that Pandas only provides colors for up to 7 different categories. It sets the remaining colors as blue. How to I ensure that every category has a unique color?
Example:
df = pd.DataFrame(np.abs(np.random.randn(10,10)),columns=['A','B','C','D','E','F','G','H','I','J'], index=range(10))
df.plot(kind='bar',stacked=True,figsize=(20,10))
Produces a bar chart where H,I, and J are not given unique colors.
matplotlib has a bunch of different colormaps to choose from. Just don't use
jet
.